Skip to content

Commit 43143b5

Browse files
committed
close vercel#832
1 parent 7858407 commit 43143b5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/use-swr.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,10 @@ const mutate: mutateInterface = async (
215215
if (error) throw error
216216
return cache.get(key)
217217
})
218+
} else {
219+
// eslint-disable-next-line require-atomic-updates
220+
MUTATION_TS[key] = undefined
221+
MUTATION_END_TS[key] = undefined
218222
}
219223
// throw error or return data to be used by caller of mutate
220224
if (error) throw error

0 commit comments

Comments
 (0)