Skip to content

Commit b72440e

Browse files
fix: when data is false return initialData instead of data (#649)
1 parent 81cd8c0 commit b72440e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/use-dataloader/src/useDataLoader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ const useDataLoader = <T>(
154154
})
155155

156156
return {
157-
data: request.getData() || (initialData as T),
157+
data: request.getData() ?? (initialData as T),
158158
error: request?.error,
159159
isError,
160160
isIdle,

0 commit comments

Comments
 (0)