8000 Ensure correct scope · galaxyblur/nativescript-vue@d7362a5 · GitHub
[go: up one dir, main page]

Skip to content

Commit d7362a5

Browse files
committed
Ensure correct scope
1 parent 9610865 commit d7362a5

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

platform/nativescript/navigator-plugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export default {
4141
frame,
4242
Object.assign(
4343
{
44-
create: () => {
44+
create() {
4545
resolve(toPage)
4646
return toPage
4747
}

platform/nativescript/router-plugin.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export default {
3333
if (this.$options.router) {
3434
this.__is_router__ = true
3535
const router = this.$options.router
36+
const self = this
3637

3738
patchGo(router)
3839

@@ -46,11 +47,8 @@ export default {
4647
clearHistory: true
4748
}).then(() => {
4849
// Mount the root component (Should be <router-page>) to register router hooks
49-
this.$nextTick(() => {
50-
const placeholder = this.$document.createComment('placeholder')
51-
52-
this.$mount(placeholder)
53-
})
50+
const placeholder = Vue.$document.createComment('placeholder')
51+
self.$mount(placeholder)
5452
})
5553
}
5654
}

0 commit comments

Comments
 (0)
0