debug t.map not a function

This commit is contained in:
Henry Jameson 2021-06-16 12:30:12 +03:00
parent 932e9747b2
commit 779c753f99

View file

@ -1194,6 +1194,7 @@ const chats = ({ credentials }) => {
return fetch(PLEROMA_CHATS_URL, { headers: authHeaders(credentials) })
.then((data) => data.json())
.then((data) => {
if (typeof data.map !== 'function') console.log(data)
return { chats: data.map(parseChat).filter(c => c) }
})
}