8000 fix: assign template bag to current instance · tMathaiou/nativescript-vue@dd74d2f · GitHub
[go: up one dir, main page]

Skip to content

Commit dd74d2f

Browse files
committed
fix: assign template bag to current instance
1 parent 7ba5b1b commit dd74d2f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

platform/nativescript/runtime/components/v-template.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ export default {
2121
return
2222
}
2323

24-
this.$parent.$templates = this.$parent.$templates || new TemplateBag()
25-
this.$parent.$templates.registerTemplate(
24+
this.$templates = this.$parent.$templates =
25+
this.$parent.$templates || new TemplateBag()
26+
this.$templates.registerTemplate(
2627
this.$props.name || (this.$props.if ? `v-template-${tid++}` : 'default'),
2728
this.$props.if,
2829
this.$scopedSlots.default

0 commit comments

Comments
 (0)
0