Skip to content

Commit

Permalink
fix fetching query
Browse files Browse the repository at this point in the history
  • Loading branch information
holiber committed Jul 7, 2022
1 parent 9893f41 commit af93c67
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/store/plugins/inject-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ export class QueryModule<
} else {
fetchResult = this.options.fetch(this.getParams());
}
this.fetchingPromise = fetchResult;

if (fetchResult?.then) {
if (this.isInitialFetch) {
Expand All @@ -169,7 +170,6 @@ export class QueryModule<
}
const promiseId = generateId();
this.promiseId = promiseId;
this.fetchingPromise = fetchResult;
const prevData = this.state.data;
return fetchResult.then((data: TData) => {
if (!this.enabled || this.promiseId !== promiseId) return;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "slap",
"version": "0.1.93",
"version": "0.1.94",
"description": "Streamlabs Application modules",
"scripts": {
"test": "jest --collectCoverage",
Expand Down

0 comments on commit af93c67

Please sign in to comment.