Skip to content

Commit

Permalink
#16. seems to have fixed the issue. more testing needed.
Browse files Browse the repository at this point in the history
  • Loading branch information
aruntk committed Apr 4, 2017
1 parent 3b3fd86 commit 65e6478
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"apollo-client": "^0.5.0"
},
"dependencies": {
"lodash.map": "^4.6.0",
"lodash.clone": "^4.5.0",
"lodash.omit": "^4.5.0"
},
"devDependencies": {
Expand Down
7 changes: 6 additions & 1 deletion src/polymer-apollo.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* eslint-disable no-param-reassign, func-names, no-console */
import omit from 'lodash.omit';
import clone from 'lodash.clone';

export class DollarApollo {
constructor(el) {
Expand All @@ -10,7 +11,9 @@ export class DollarApollo {
this._subscription = {};
this.attached = false;
}

setEl(el) {
this.el = el;
}
get client() {
return this.el._apolloClient;
}
Expand Down Expand Up @@ -280,6 +283,7 @@ export class PolymerApollo {
}
created() {
const apollo = this.apollo;
this.$apollo = clone(this.$apollo);
if (apollo) {
this.$apollo.init(this);
}
Expand All @@ -292,6 +296,7 @@ export class PolymerApollo {
}
}
attached() {
this.$apollo.setEl(this);
const apollo = this.apollo;
if (apollo && !this.apollo.onReady) {
this.$apollo.attached = true;
Expand Down

0 comments on commit 65e6478

Please sign in to comment.