Comparing version 0.13.2 to 0.14.0
@@ -431,7 +431,12 @@ 'use strict'; | ||
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; | ||
if (!this.initialized) { | ||
return; | ||
} | ||
var store = options.store; | ||
var cascade = options.cascade; | ||
if (this.initialized && this.shouldUpdate(stateUpdate)) { | ||
Object.assign(this[store], stateUpdate); | ||
Object.assign(this[store], stateUpdate); | ||
if (store !== 'state' || this.shouldUpdate(this[store])) { | ||
this.domPatcher.update(this.state); | ||
@@ -438,0 +443,0 @@ |
@@ -386,5 +386,9 @@ import cuid from 'cuid'; | ||
updateSelfAndChildren(stateUpdate, options={}) { | ||
if (!this.initialized) { | ||
return; | ||
} | ||
const {store, cascade} = options; | ||
if (this.initialized && this.shouldUpdate(stateUpdate)) { | ||
Object.assign(this[store], stateUpdate); | ||
Object.assign(this[store], stateUpdate); | ||
if (store !== `state` || this.shouldUpdate(this[store])) { | ||
this.domPatcher.update(this.state); | ||
@@ -391,0 +395,0 @@ |
{ | ||
"name": "panel", | ||
"version": "0.13.2", | ||
"version": "0.14.0", | ||
"description": "Web Components with Virtual DOM: lightweight composable web apps", | ||
@@ -15,3 +15,3 @@ "main": "build/index.js", | ||
"docs": "rm -rf docs && jsdoc lib lib/isorender -t node_modules/minami -R README-API.md -d docs", | ||
"prepublish": "npm run build", | ||
"prepublishOnly": "npm run build", | ||
"publish-devtools": "node scripts/publish-devtools.js", | ||
@@ -18,0 +18,0 @@ "test": "npm run build-test && npm run test-server && npm run test-browser-local", |
97822
1855