Skip to content

Commit

Permalink
Release 1.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Mar 17, 2017
1 parent 102e0b1 commit dc8a416
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
15 changes: 11 additions & 4 deletions dist/vuefire.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,12 @@ return /******/ (function(modules) { // webpackBootstrap
function bind (vm, key, source) {
var asObject = false
var cancelCallback = null
var readyCallback = null
// check { source, asArray, cancelCallback } syntax
if (isObject(source) && source.hasOwnProperty('source')) {
asObject = source.asObject
cancelCallback = source.cancelCallback
readyCallback = source.readyCallback
source = source.source
}
if (!isObject(source)) {
Expand All @@ -154,6 +156,9 @@ return /******/ (function(modules) { // webpackBootstrap
} else {
bindAsArray(vm, key, source, cancelCallback)
}
if (readyCallback) {
source.once('value', readyCallback.bind(vm))
}
}

/**
Expand Down Expand Up @@ -306,20 +311,22 @@ return /******/ (function(modules) { // webpackBootstrap
mergeStrats.firebase = mergeStrats.methods

// extend instance methods
Vue.prototype.$bindAsObject = function (key, source, cancelCallback) {
Vue.prototype.$bindAsObject = function (key, source, cancelCallback, readyCallback) {
ensureRefs(this)
bind(this, key, {
source: source,
asObject: true,
cancelCallback: cancelCallback
cancelCallback: cancelCallback,
readyCallback: readyCallback
})
}

Vue.prototype.$bindAsArray = function (key, source, cancelCallback) {
Vue.prototype.$bindAsArray = function (key, source, cancelCallback, readyCallback) {
ensureRefs(this)
bind(this, key, {
source: source,
cancelCallback: cancelCallback
cancelCallback: cancelCallback,
readyCallback: readyCallback
})
}

Expand Down
2 changes: 1 addition & 1 deletion dist/vuefire.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vuefire",
"version": "1.3.1",
"version": "1.4.0",
"description": "Firebase bindings for Vue.js",
"main": "dist/vuefire.js",
"files": [
Expand Down

0 comments on commit dc8a416

Please sign in to comment.