Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cascade

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cascade - npm Package Compare versions

Comparing version 0.4.2 to 0.4.3

21

dist/scripts/dom/Component.js

@@ -206,15 +206,12 @@ Object.defineProperty(exports, "__esModule", { value: true });

let oldRoot = oldRootComponentNode.component;
if (newRootComponentNode === oldRootComponentNode) {
return oldElement;
}
if (!oldRoot) {
throw 'Old Component has never been rendered. Replacing with new Component.';
}
oldRootComponentNode.component = undefined;
newRootComponentNode.component = oldRoot;
let innerOldRoot;
let innerRoot;
if (oldRoot) {
innerOldRoot = Cascade_1.default.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_1.default.peekDirty(newRootComponentNode.component, 'root');
}
let innerOldRoot = Cascade_1.default.peekDirty(oldRoot, 'root');
let innerRoot = oldRoot.update(newRootComponentNode.props, ...newRootComponentNode.children);
if (!innerOldRoot) {

@@ -304,2 +301,4 @@ switch (typeof innerRoot) {

}
else if (newRoot === oldRoot) {
}
else {

@@ -306,0 +305,0 @@ var diff = Diff_1.default.compare(oldRoot.children, newRoot.children, compareVirtualNodes);

{
"name": "cascade",
"version": "0.4.2",
"version": "0.4.3",
"description": "A modern library for creating user interfaces.",

@@ -5,0 +5,0 @@ "author": "Sean Johnson <sjohnson@sjohnsonaz.com>",

@@ -285,16 +285,16 @@ import Cascade from '../cascade/Cascade';

let oldRoot = oldRootComponentNode.component;
if (newRootComponentNode === oldRootComponentNode) {
// No diff necessary. We have the exact same Components
return oldElement;
}
if (!oldRoot) {
// This should never happen
throw 'Old Component has never been rendered. Replacing with new Component.';
}
oldRootComponentNode.component = undefined;
newRootComponentNode.component = oldRoot;
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 innerOldRoot = Cascade.peekDirty(oldRoot, 'root');
let innerRoot = oldRoot.update(newRootComponentNode.props, ...newRootComponentNode.children);

@@ -401,2 +401,4 @@ if (!innerOldRoot) {

oldElement = newRoot.toNode(namespace);
} else if (newRoot === oldRoot) {
// No diff necessary. We have the exact same VirtualNodes
} else {

@@ -403,0 +405,0 @@ // Old and New Roots match

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc