Skip to content

Commit

Permalink
fix(fetch): revalidateCallback issue
Browse files Browse the repository at this point in the history
  • Loading branch information
alimd committed Dec 20, 2022
1 parent a4b051e commit 7207909
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/fetch/src/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ async function _handleCacheStrategy(options: Required<FetchOptions>): Promise<Re
if (networkResponse.ok) {
cacheStorage.put(request, networkResponse.clone());
if (typeof options.revalidateCallback === 'function') {
options.revalidateCallback(networkResponse);
setTimeout(options.revalidateCallback, 0, networkResponse.clone());
}
}
return networkResponse;
Expand Down

0 comments on commit 7207909

Please sign in to comment.