Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 802c224

Browse files
committed
Release 1.2.1
1 parent 1617cd9 commit 802c224

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed

‎dist/vuefire.js‎

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,22 @@ return /******/ (function(modules) { // webpackBootstrap
156156
}
157157
}
158158

159+
/**
160+
* Define a reactive property in a given vm if it's not defined
161+
* yet
162+
*
163+
* @param {Vue} vm
164+
* @param {string} key
165+
* @param {*} val
166+
*/
167+
function defineReactive (vm, key, val) {
168+
if (key in vm) {
169+
vm[key] = val
170+
} else {
171+
Vue.util.defineReactive(vm, key, val)
172+
}
173+
}
174+
159175
/**
160176
* Bind a firebase data source to a key on a vm as an Array.
161177
*
@@ -166,7 +182,7 @@ return /******/ (function(modules) { // webpackBootstrap
166182
*/
167183
function bindAsArray (vm, key, source, cancelCallback) {
168184
var array = []
169-
Vue.util.defineReactive(vm, key, array)
185+
defineReactive(vm, key, array)
170186

171187
var onAdd = source.on('child_added', function (snapshot, prevKey) {
172188
var index = prevKey ? indexForKey(array, prevKey) + 1 : 0
@@ -207,7 +223,7 @@ return /******/ (function(modules) { // webpackBootstrap
207223
* @param {function|null} cancelCallback
208224
*/
209225
function bindAsObject (vm, key, source, cancelCallback) {
210-
Vue.util.defineReactive(vm, key, {})
226+
defineReactive(vm, key, {})
211227
var cb = source.on('value', function (snapshot) {
212228
vm[key] = createRecord(snapshot)
213229
}, cancelCallback)

‎dist/vuefire.min.js‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vuefire",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"description": "Firebase bindings for Vue.js",
55
"main": "dist/vuefire.js",
66
"files": [

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /