framework7io / framework7

Full featured HTML framework for building iOS & Android apps
http://framework7.io
MIT License
18.04k stars 3.23k forks source link

Error when removing page in smart select view #4129

Open malipetek opened 1 year ago

malipetek commented 1 year ago

Hello everyone,

I realized structure of viewrouter object is different when I immediately try to go back in a page of a smart select.

image

As you can see this does not have a pages prop, therefore throws an error in the following line. https://github.com/framework7io/framework7/blob/1785a4ed11997279e8aba706bb7cbb697e81e0fb/src/svelte/shared/components-router.js#L103-L104

However if I wait for a bit and use smart select it works fine and viewRouter variable has a object of this structure.

image

I could not trace it deeper as of now, I can give you any other details if someone can give me an idea what could be cause of this.

stanleyxu2005 commented 1 year ago

Hi @malipetek In the first screenshot there is a viewpages: [] and in the second screenshot it is pages: []. Can it be that you are expecting a page but actually it is configured/returned as a view?