Permalink
Browse files

fix(Component): Fixed disconnectedCallback when removing another comp…

…onent
  • Loading branch information...
calebdwilliams committed Jul 22, 2018
1 parent 7617fb8 commit 768b026e799679319d03d0b16d5d0d71cacd0bc1
@@ -557,7 +557,7 @@ class Component extends HTMLElement {
if (this.constructor.renderer && typeof this[this.constructor.renderer] === 'function') {
this.removeEventListener('ComponentRender', this[this.constructor.renderer]);
}
this[rendererSymbol][removeSymbol]();
this[rendererSymbol] && this[rendererSymbol][removeSymbol]();
}

emit(eventName, detail) {

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -553,7 +553,7 @@ class Component extends HTMLElement {
if (this.constructor.renderer && typeof this[this.constructor.renderer] === 'function') {
this.removeEventListener('ComponentRender', this[this.constructor.renderer]);
}
this[rendererSymbol][removeSymbol]();
this[rendererSymbol] && this[rendererSymbol][removeSymbol]();
}

emit(eventName, detail) {

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -556,7 +556,7 @@ class Component extends HTMLElement {
if (this.constructor.renderer && typeof this[this.constructor.renderer] === 'function') {
this.removeEventListener('ComponentRender', this[this.constructor.renderer]);
}
this[rendererSymbol][removeSymbol]();
this[rendererSymbol] && this[rendererSymbol][removeSymbol]();
}

emit(eventName, detail) {

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -559,7 +559,7 @@ class Component extends HTMLElement {
if (this.constructor.renderer && typeof this[this.constructor.renderer] === 'function') {
this.removeEventListener('ComponentRender', this[this.constructor.renderer]);
}
this[rendererSymbol][removeSymbol]();
this[rendererSymbol] && this[rendererSymbol][removeSymbol]();
}

emit(eventName, detail) {

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -147,7 +147,7 @@ export class Component extends HTMLElement {
if (this.constructor.renderer && typeof this[this.constructor.renderer] === 'function') {
this.removeEventListener('ComponentRender', this[this.constructor.renderer]);
}
this[rendererSymbol][removeSymbol]();
this[rendererSymbol] && this[rendererSymbol][removeSymbol]();
}

emit(eventName, detail) {
@@ -471,7 +471,7 @@ class Component extends HTMLElement {
return this.getAttribute(attr) || this.hasAttribute(attr);
},
set(_attr) {
if (_attr || attr === '') {
if (_attr || _attr === '') {
this.setAttribute(attr, _attr);
} else {
this.removeAttribute(attr);
@@ -553,7 +553,7 @@ class Component extends HTMLElement {
if (this.constructor.renderer && typeof this[this.constructor.renderer] === 'function') {
this.removeEventListener('ComponentRender', this[this.constructor.renderer]);
}
this[rendererSymbol][removeSymbol]();
this[rendererSymbol] && this[rendererSymbol][removeSymbol]();
}

emit(eventName, detail) {

0 comments on commit 768b026

Please sign in to comment.