Skip to content

Commit

Permalink
Merge pull request #324 from merlinnot/fix-issue-323
Browse files Browse the repository at this point in the history
Fix `super.connectedCallback` invocation in FirestoreMixin
  • Loading branch information
tjmonsi authored Feb 20, 2018
2 parents 0fcfc37 + cb3b093 commit 7d19610
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions firebase-firestore-mixin.html
Original file line number Diff line number Diff line change
Expand Up @@ -163,22 +163,22 @@
}

connectedCallback() {
if (this[CONNECTED_CALLBACK_TOKEN] === true) {
return;
}
this[CONNECTED_CALLBACK_TOKEN] = true;

const props = collect(this.constructor, 'properties');
Object
.values(props)
.forEach(this.constructor._assertPropertyTypeCorrectness);

for (let name in props) {
const options = props[name];
if (options.doc || options.collection) {
this._firestoreBind(name, options);
if (this[CONNECTED_CALLBACK_TOKEN] !== true) {
this[CONNECTED_CALLBACK_TOKEN] = true;

const props = collect(this.constructor, 'properties');
Object
.values(props)
.forEach(this.constructor._assertPropertyTypeCorrectness);

for (let name in props) {
const options = props[name];
if (options.doc || options.collection) {
this._firestoreBind(name, options);
}
}
}

super.connectedCallback();
}

Expand Down

0 comments on commit 7d19610

Please sign in to comment.