Return undefined instead of null for useUserById(undefined)
This commit is contained in:
parent
a93e64c830
commit
8daf1b2ba8
|
@ -53,6 +53,8 @@ export const useUserById = (userId = '_') => {
|
||||||
{ subscribe: true, includeMetadataChanges: true }
|
{ subscribe: true, includeMetadataChanges: true }
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (userId === '_') return undefined
|
||||||
|
|
||||||
return result.isLoading ? undefined : result.data
|
return result.isLoading ? undefined : result.data
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user