Skip to content

Commit 63f8f14

Browse files
committed
fix: destroy the navigation entry instance when the page is disposed
1 parent 593dd95 commit 63f8f14

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

platform/nativescript/plugins/navigator-plugin.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,14 @@ export default {
7575
}
7676
page.on('navigatedFrom', handler)
7777

78+
// ensure that the navEntryInstance vue instance is destroyed when the
79+
// page is disposed (clearHistory: true for example)
80+
const dispose = page.disposeNativeView
81+
page.disposeNativeView = (...args) => {
82+
navEntryInstance.$destroy()
83+
dispose.call(page, args)
84+
}
85+
7886
frame.navigate(Object.assign({}, options, { create: () => page }))
7987
resolve(page)
8088
})

0 commit comments

Comments
 (0)