Closebyrouter error

how can i fix this error
Untitled

Should we guess what sequence of steps caused this error?

I navigated to second page, got back to the main page and navigated to second page again and I got this error.
I navigate by clicking on a button on a side-panel by using this.$f7.view.main.router.navigate("/secondPage/");