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 26, 2024
1 parent 02d0c0c commit a8f6396
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 a8f6396

Please sign in to comment.