Skip to content

Commit 584c064

Browse files
author
Ari Bouius
committed
Fix useIsFetching not resetting to false
1 parent 39ca8ff commit 584c064

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/client.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ export class ApiClient {
146146

147147
query.cache = await this.request(query.url, { headers })
148148
query.timestamp = new Date().getTime()
149-
149+
query.promise = null
150+
150151
const result = this.normalize(query.cache)
151152

152153
this.dispatch({
@@ -164,8 +165,6 @@ export class ApiClient {
164165
this.scheduleGC(query, query.cacheTime)
165166
}
166167

167-
query.promise = null
168-
169168
return result
170169
})())
171170
}

0 commit comments

Comments
 (0)