Skip to content

Commit

Permalink
Only set data if result is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
jerelmiller committed Aug 27, 2024
1 parent 270e6f6 commit edb69fc
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/core/QueryManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -805,10 +805,12 @@ export class QueryManager<TStore> {
query: this.transform(options.query),
})
.then((result) => {
result.data = this.maskOperation({
document: options.query,
data: result.data,
});
if (result) {
result.data = this.maskOperation({
document: options.query,
data: result.data,
});
}

return result;
})
Expand Down

0 comments on commit edb69fc

Please sign in to comment.