Skip to content

Commit 2b9a5ba

Browse files
committed
fix: fixed . See nativescript-vue#292
1 parent df2c87b commit 2b9a5ba

File tree

1 file changed

+5
-1
lines changed
  • platform/nativescript/runtime/components

1 file changed

+5
-1
lines changed

platform/nativescript/runtime/components/page.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ export default {
1414
},
1515
created() {
1616
if (this.$router) {
17-
this.$vnode.parent.data.keepAlive = true
17+
// Sometimes the parent is undefined
18+
// See https://github.com/nativescript-vue/nativescript-vue/issues/292
19+
if (this.$vnode.parent) {
20+
this.$vnode.parent.data.keepAlive = true
21+
}
1822
}
1923
},
2024
mounted() {

0 commit comments

Comments
 (0)