Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Ensure that a unique, serialized key is only created once per navigateTo #818

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion platform/nativescript/plugins/navigator-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ export default {
// build options object with defaults
options = Object.assign({}, defaultOptions, options)

// create a unique key to distinguish the pages
const serializedKey = serializeNavigationOptions(options)

return new Promise(resolve => {
const frame = getFrameInstance(options.frame)
const navEntryInstance = new Vue({
Expand All @@ -84,7 +87,7 @@ export default {
render: h =>
h(component, {
props: options.props,
key: serializeNavigationOptions(options)
key: serializedKey
})
})
const page = navEntryInstance.$mount().$el.nativeView
Expand Down