diff --git a/firestore-element.html b/firestore-element.html
index 2f00551..1feef99 100644
--- a/firestore-element.html
+++ b/firestore-element.html
@@ -131,10 +131,11 @@
super();
this._firestoreProps = {};
this._firestoreListeners = {};
- this.db = this.constructor.db || firebase.firestore();
}
connectedCallback() {
+ super.connectedCallback();
+ this.db = this.constructor.db || firebase.firestore();
const props = collect(this.constructor, 'properties');
for (let name in props) {
if (props[name].doc) {
@@ -143,7 +144,6 @@
this._firestoreBind('collection', props[name].collection, name, props[name].live, props[name].observes);
}
}
- super.connectedCallback();
}
_firestoreBind(type, path, name, live = false, observes = []) {
@@ -205,7 +205,7 @@
delete this._firestoreListeners[name];
}
}
- }
- }
+ };
+ };
})(window);
\ No newline at end of file