Comparing version 0.4.1 to 0.4.2
@@ -209,6 +209,12 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
let innerOldRoot; | ||
let innerRoot; | ||
if (oldRoot) { | ||
innerOldRoot = Cascade_1.default.peekDirty(oldRoot, 'root'); | ||
innerRoot = oldRoot.update(newRootComponentNode.props, ...newRootComponentNode.children); | ||
} | ||
let innerRoot = oldRoot.update(newRootComponentNode.props, ...newRootComponentNode.children); | ||
else { | ||
console.error('Old Component has never been rendered. Replacing with new Component.'); | ||
newRootComponentNode.toComponent(); | ||
innerRoot = Cascade_1.default.peekDirty(newRootComponentNode.component, 'root'); | ||
} | ||
if (!innerOldRoot) { | ||
@@ -215,0 +221,0 @@ switch (typeof innerRoot) { |
{ | ||
"name": "cascade", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"description": "A modern library for creating user interfaces.", | ||
@@ -5,0 +5,0 @@ "author": "Sean Johnson <sjohnson@sjohnsonaz.com>", |
@@ -289,7 +289,12 @@ import Cascade from '../cascade/Cascade'; | ||
let innerOldRoot; | ||
let innerRoot; | ||
// TODO: Fix this. It should always have a value, but occasionally it doesn't. | ||
if (oldRoot) { | ||
innerOldRoot = Cascade.peekDirty(oldRoot, 'root'); | ||
innerRoot = oldRoot.update(newRootComponentNode.props, ...newRootComponentNode.children); | ||
} else { | ||
console.error('Old Component has never been rendered. Replacing with new Component.'); | ||
newRootComponentNode.toComponent(); | ||
innerRoot = Cascade.peekDirty(newRootComponentNode.component, 'root'); | ||
} | ||
let innerRoot = oldRoot.update(newRootComponentNode.props, ...newRootComponentNode.children); | ||
@@ -296,0 +301,0 @@ if (!innerOldRoot) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
388005
10322