Skip to content

Commit

Permalink
fix: error throwed when query.data === null
Browse files Browse the repository at this point in the history
  • Loading branch information
LeuisKen authored and otakustay committed Jun 15, 2020
1 parent 35ba4fb commit b696f6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export function useResource<I, O>(
throw pending;
}

if (query.data) {
if (query.hasOwnProperty('data')) {
return [
query.data,
{
Expand Down

0 comments on commit b696f6b

Please sign in to comment.