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

panel

Package Overview
Dependencies
Maintainers
7
Versions
131
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

panel - npm Package Compare versions

Comparing version 2.1.3 to 2.2.0

22

build/component.js

@@ -383,2 +383,4 @@ 'use strict';

value: function disconnectedCallback() {
var _this2 = this;
if (!this.initialized) {

@@ -401,9 +403,21 @@ return;

this.$panelRoot = null;
this.$panelParent = null;
this.appState = null;
this.app = null;
this.domPatcher = null;
this._rendered = null;
this.initialized = false;
// if a child component is added via child() and has keys, snabbdom uses parentEl.insertBefore
// which disconnects the element and immediately connects it at another position.
// usually the child's disconnectedCallback is called before the parent's
// but in that case the parents are removed from dom before the children
// which causes a $panelParent not found exception for the grandchildren.
// we clean up parent references in an async manner so we can handle that situation.
Promise.resolve().then(function () {
// only clear references if element hasn't been re-initialized
if (!_this2.initialized) {
_this2.$panelRoot = null;
_this2.$panelParent = null;
_this2.appState = null;
_this2.app = null;
}
});
}

@@ -410,0 +424,0 @@

20

lib/component.js

@@ -327,9 +327,21 @@ import cuid from 'cuid';

this.$panelRoot = null;
this.$panelParent = null;
this.appState = null;
this.app = null;
this.domPatcher = null;
this._rendered = null;
this.initialized = false;
// if a child component is added via child() and has keys, snabbdom uses parentEl.insertBefore
// which disconnects the element and immediately connects it at another position.
// usually the child's disconnectedCallback is called before the parent's
// but in that case the parents are removed from dom before the children
// which causes a $panelParent not found exception for the grandchildren.
// we clean up parent references in an async manner so we can handle that situation.
Promise.resolve().then(() => {
// only clear references if element hasn't been re-initialized
if (!this.initialized) {
this.$panelRoot = null;
this.$panelParent = null;
this.appState = null;
this.app = null;
}
});
}

@@ -336,0 +348,0 @@

{
"name": "panel",
"version": "2.1.3",
"version": "2.2.0",
"description": "Web Components with Virtual DOM: lightweight composable web apps",

@@ -5,0 +5,0 @@ "main": "build/index.js",

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