mirror of
https://github.com/sveltejs/svelte.git
synced 2024-11-30 00:46:29 +01:00
Update store.js
This commit is contained in:
parent
b5140cdad3
commit
74b11a6389
2
store.js
2
store.js
@ -162,7 +162,7 @@ assign(Store.prototype, {
|
||||
let dirty = false;
|
||||
|
||||
for (const key in newState) {
|
||||
if (this._computed[key]) throw new Error(`'${key}' is a read-only property`);
|
||||
if (this._computed[key]) throw new Error(`'${key}' is a read-only computed property`);
|
||||
if (this._differs(newState[key], oldState[key])) changed[key] = dirty = true;
|
||||
}
|
||||
if (!dirty) return;
|
||||
|
Loading…
Reference in New Issue
Block a user