Skip to content

Commit 036277d

Browse files
committed
update tests
1 parent 12715ef commit 036277d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/js/samples/legacy-default/expected-bundle.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ function destroy(detach) {
6161
this._fragment = this._state = null;
6262
}
6363

64-
function differs(a, b) {
65-
return a !== b || ((a && typeof a === 'object') || typeof a === 'function');
64+
function _differs(a, b) {
65+
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
6666
}
6767

6868
function dispatchObservers(component, group, changed, newState, oldState) {
@@ -161,7 +161,7 @@ function _set(newState) {
161161
dirty = false;
162162

163163
for (var key in newState) {
164-
if (differs(newState[key], oldState[key])) changed[key] = dirty = true;
164+
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
165165
}
166166
if (!dirty) return;
167167

@@ -199,7 +199,8 @@ var proto = {
199199
_recompute: noop,
200200
_set: _set,
201201
_mount: _mount,
202-
_unmount: _unmount
202+
_unmount: _unmount,
203+
_differs: _differs
203204
};
204205

205206
/* generated by Svelte vX.Y.Z */

0 commit comments

Comments
 (0)