Does mutate ignore null value since 1.0.0 #1439
Unanswered
jacklimwenjie
asked this question in
Q&A
Replies: 1 comment
-
That sounds like a regression, you should be able to mutate a resource to |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Just asking out of curiosity, my project has a bug that appeared to be magically "fixed" after upgrading the
swr
package to version 1.0.0.However, after a deeper inspection, I found the bug is still there.
The bug is caused by mutating a cache with a
null
value, causing a downstream component that expects the cache value to be an object and access one of its properties to crash.On the
swr
package version 1.0.0, the mutation with anull
value now keeps the previously cached value, so the downstream component no longer crashes.Is this something intended?
Beta Was this translation helpful? Give feedback.
All reactions