unify / unify

Unify Project
http://www.unifyjs.com
Other
152 stars 16 forks source link

Navigation validates path in #navigate and uses default path if path stored in Storage is invalid #92

Closed dominikg closed 12 years ago

dominikg commented 12 years ago

Reason for this proposed change:

If you change viewIds in an application update (e.g. by renaming a view class or adding/removing views), the path stored in localstorage may contain an element that is invalid for the new application version. During navigation initialization, this element causes an error that leaves the application uninitialized (white page) and reloading that page does not help.

There are 2 ways for a user to recover such an error: a) manually entering a valid navigation path in the urlbar b) deleting the invalid path from localstorage

both are not feasible for endusers and require knowlegde that only developers have

Maybe applications could try to catch the error and handle it themselves as they seem fit, but i think the framework should take care of it, hence this pull request