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
In dev mode, svelte wraps set calls in _setDev which checks to ensure that the first arg is an object, to protect against this.set("foo", 1). Which is great.
Except it doesn't currently work due to a quirk of the set() implementation.
In
dev
mode, svelte wrapsset
calls in_setDev
which checks to ensure that the first arg is an object, to protect againstthis.set("foo", 1)
. Which is great.Except it doesn't currently work due to a quirk of the
set()
implementation.set(newState)
usesthis._set(assign({}, newState))
, which is calling out to theassign()
function. So far so good.Except that when the
newState
value is a string,assign()
doesn't handle it very well.So
_setDev()
ends up getting passed a nonsense object, which bypasses the check for a string value and the error is never shown.Will end up invoking
_setDev()
with an arg like{ 0 : "k", 1 : "e", 2 : "y" }
, which passes thetypeof
check and then does nothing useful.The text was updated successfully, but these errors were encountered: