Skip to content

Commit

Permalink
rename to preventRender
Browse files Browse the repository at this point in the history
  • Loading branch information
Raynos committed Jul 9, 2020
1 parent 7fbc142 commit b8843b4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Tonic extends window.HTMLElement {
const state = Tonic._states[super.id]
delete Tonic._states[super.id]
this._state = state || {}
this.shouldRender = true
this.preventRender = false
this.props = {}
this.elements = [...this.children]
this.elements.__children__ = true
Expand Down Expand Up @@ -315,7 +315,6 @@ class Tonic extends window.HTMLElement {
}

connectedCallback () {
this.shouldRender = true
this.root = this.shadowRoot || this

if (this.wrap) {
Expand Down Expand Up @@ -355,7 +354,7 @@ class Tonic extends window.HTMLElement {
this._id = this._id || Tonic._createId()

this.willConnect && this.willConnect()
if (this.shouldRender) {
if (this.preventRender) {
if (!this._source) {
this._source = this.innerHTML
} else {
Expand Down

0 comments on commit b8843b4

Please sign in to comment.