Skip to content

Commit

Permalink
[fix]
Browse files Browse the repository at this point in the history
  • Loading branch information
木瓜丸 committed Dec 20, 2020
1 parent 727aa18 commit b6e33f2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ export class ProviderComponent extends Component {
const walker = document.createTreeWalker(template);
while(walker.nextNode()){
if(walker.currentNode instanceof Component) {
for(const k of Object.keys(this.context)) {
walker.currentNode.context[k] = this.context[k];
}
walker.currentNode.context[this.providerId] = this;
walker.currentNode.setContext(walker.currentNode.shadowRoot);
}
Expand Down

0 comments on commit b6e33f2

Please sign in to comment.