Skip to content

Commit

Permalink
still call connected()
Browse files Browse the repository at this point in the history
  • Loading branch information
Raynos committed Jul 9, 2020
1 parent 4b784a4 commit 7fbc142
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,15 +355,15 @@ class Tonic extends window.HTMLElement {
this._id = this._id || Tonic._createId()

this.willConnect && this.willConnect()
if (!this.shouldRender) return
if (this.shouldRender) {
if (!this._source) {
this._source = this.innerHTML
} else {
this.innerHTML = this._source
}

if (!this._source) {
this._source = this.innerHTML
} else {
this.innerHTML = this._source
Tonic._maybePromise(this._set(this.root, this.render))
}

Tonic._maybePromise(this._set(this.root, this.render))
Tonic._maybePromise(this.connected && this.connected())
}

Expand Down

0 comments on commit 7fbc142

Please sign in to comment.