Skip to content

Commit c52e818

Browse files
committed
Fix firebase function access to the vm
Fix #66 Change the hook to created for both Vue 1 and Vue 2 so the data is initialized and accessing to this yields expected results
1 parent f4bee37 commit c52e818

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/vuefire.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,7 @@ var init = function () {
222222
}
223223

224224
var VueFireMixin = {
225-
init: init, // 1.x
226-
beforeCreate: init, // 2.x
225+
created: init, // 1.x and 2.x
227226
beforeDestroy: function () {
228227
if (!this.$firebaseRefs) return
229228
for (var key in this.$firebaseRefs) {

0 commit comments

Comments
 (0)