diff --git a/test/js/samples/legacy-default/expected-bundle.js b/test/js/samples/legacy-default/expected-bundle.js index 3804eeb7df..f2fa173262 100644 --- a/test/js/samples/legacy-default/expected-bundle.js +++ b/test/js/samples/legacy-default/expected-bundle.js @@ -61,8 +61,8 @@ function destroy(detach) { this._fragment = this._state = null; } -function differs(a, b) { - return a !== b || ((a && typeof a === 'object') || typeof a === 'function'); +function _differs(a, b) { + return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function'); } function dispatchObservers(component, group, changed, newState, oldState) { @@ -161,7 +161,7 @@ function _set(newState) { dirty = false; for (var key in newState) { - if (differs(newState[key], oldState[key])) changed[key] = dirty = true; + if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true; } if (!dirty) return; @@ -199,7 +199,8 @@ var proto = { _recompute: noop, _set: _set, _mount: _mount, - _unmount: _unmount + _unmount: _unmount, + _differs: _differs }; /* generated by Svelte vX.Y.Z */