0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-11-30 17:00:40 +01:00

update tests

This commit is contained in:
Rich Harris 2018-02-23 09:11:10 -05:00
parent 12715efbc1
commit 036277df64

View File

@ -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 */