Return undefined instead of null for useUserById(undefined)

This commit is contained in:
James Grugett 2022-07-14 12:03:29 -05:00
parent a93e64c830
commit 8daf1b2ba8

View File

@ -53,6 +53,8 @@ export const useUserById = (userId = '_') => {
{ subscribe: true, includeMetadataChanges: true }
)
if (userId === '_') return undefined
return result.isLoading ? undefined : result.data
}