You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
REPL. Normally with stores we use conservative comparison logic — if a value is a non-primitive, then set or update is considered to have changed the value even if it has referential equality.
That's not the case with derived stores. This causes surprising behaviour when you're reusing objects, as is common in WebGL programming.
The text was updated successfully, but these errors were encountered:
What's even weirder is that this difference only applies when the callback given to derived is lacking a set parameter. Here's another REPL to demonstrate.
I can see the bug in line 58 of store.mjs. I don't see why the if-condition needs to be anything more than auto; wouldn't the set call be able to do the needed equality check on its own?
REPL. Normally with stores we use conservative comparison logic — if a value is a non-primitive, then
set
orupdate
is considered to have changed the value even if it has referential equality.That's not the case with derived stores. This causes surprising behaviour when you're reusing objects, as is common in WebGL programming.
The text was updated successfully, but these errors were encountered: