Skip to content

Commit

Permalink
Version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau committed Aug 29, 2017
1 parent 015e0a1 commit f391a6a
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
13 changes: 11 additions & 2 deletions dist/vue-apollo.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -3226,7 +3226,7 @@ var ApolloProvider$1 = function () {
var componentClient = apolloOptions.$client;
for (var key in apolloOptions) {
var options = apolloOptions[key];
if (!options.query || (typeof options.ssr === 'undefined' || options.ssr) && typeof options.prefetch !== 'undefined' && options.prefetch) {
if (key.charAt(0) !== '$' && (!options.query || (typeof options.ssr === 'undefined' || options.ssr) && typeof options.prefetch !== 'undefined' && options.prefetch)) {
this.willPrefetchQuery(options, options.client || componentClient);
}
}
Expand Down Expand Up @@ -3403,7 +3403,6 @@ var prepare = function prepare() {
if (apollo) {
this._apolloQueries = {};
this._apolloInitData = {};
this.$apollo = new DollarApollo(this);

if (!apollo.$init) {
apollo.$init = true;
Expand Down Expand Up @@ -3493,6 +3492,16 @@ function install(Vue, options) {
return Object.assign(map, merge(toData, fromData));
};

// Lazy creation
Object.defineProperty(Vue.prototype, '$apollo', {
get: function get() {
if (!this._apollo) {
this._apollo = new DollarApollo(this);
}
return this._apollo;
}
});

Vue.mixin({

// Vue 1.x
Expand Down
Loading

0 comments on commit f391a6a

Please sign in to comment.