fix: tsc error

This commit is contained in:
Adhiraj Singh
2021-12-23 10:12:29 +05:30
parent ee3486124d
commit 8c37ccf525

View File

@@ -135,7 +135,8 @@ export const makeChatsSocket = (config: SocketConfig) => {
type: 'get'
}
})
return result.content[0].content.map(i => i.attrs.jid)
const child = result.content?.[0] as BinaryNode
return (child.content as BinaryNode[])?.map(i => i.attrs.jid)
}
const updateBlockStatus = async(jid: string, action: 'block' | 'unblock') => {