Uncaught TypeError: Cannot read property 'route' of undefined in Vue.JS 3.5.5
See original GitHub issue- Framework7 version: ^4.2.2
- Vue.js version: 3.5.5
- Platform and Target: Google Chrome
Here’s the console log error
Uncaught TypeError: Cannot read property ‘route’ of undefined at Router.back (back.js?770e:577) at Framework7.handleClicks (clicks.js?9dd2:82) at eval (events-class.js?8085:79) at Array.forEach (<anonymous>) at eval (events-class.js?8085:78) at Array.forEach (<anonymous>) at Framework7.emit (events-class.js?8085:72) at emitAppTouchEvent (touch.js?460e:663) at HTMLDocument.appClick (touch.js?460e:669) back @ back.js?770e:577 handleClicks @ clicks.js?9dd2:82 (anonymous) @ events-class.js?8085:79 (anonymous) @ events-class.js?8085:78 emit @ events-class.js?8085:72 emitAppTouchEvent @ touch.js?460e:663 appClick @ touch.js?460e:669
It works at first but after the 2nd try, then it throws an error on the console log.
Here’s my App.vue
<template>
<div id="app">
<f7-app :params="f7params">
<f7-view
tab
main
url="/home/"
>
</f7-view>
</f7-app>
</div>
</template>
<style>
@import url("https://fonts.googleapis.com/icon?family=Material+Icons");
</style>
<script>
import routes from "./router";
export default {
data: () => ({
f7params: {
name: "My App",
id: "com.myapp.test",
theme: "auto",
routes: routes
}
})
};
</script>
Here’s my sample Something Page
<template>
<div>
<f7-page :page-content="false">
<f7-navbar title="Something" back-link="Back">
<f7-nav-right>
<f7-link
icon-ios="f7:reload"
icon-aurora="f7:reload"
icon-md="material:compare_arrows"
></f7-link>
</f7-nav-right>
</f7-navbar>
</f7-page>
</div>
</template>
Any help? I’m new with framework7io for Vue and I don’t know why it shows an error even those are just from docs.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:14 (2 by maintainers)
Top GitHub Comments
I have the same problem when I use links with parameters like path: ‘/segement/:id?’
I have now found out that the app does not crash. It is just closed to the Background. When I press the button for the active apps selection, it’s there and I can open it again. Looks like if the router does not push the navigation events to the OS (however this works).