rdkcentral / Lightning-SDK

SDK for Lightning framework
Apache License 2.0
130 stars 69 forks source link

Problems in 2nd navigation in route with different params #128

Closed dlee005c closed 3 years ago

dlee005c commented 4 years ago

This problem is in the Router plugin.

When you are in a route, and navigate to that same route, with different parameters, if the data provider fails, it causes an error and does not navigate to the ! route

appBundle.js:2911 Uncaught (in promise) TypeError: Cannot read property 'match' of undefined at getValuesFromHash (appBundle.js:2911) at providePageData (appBundle.js:2534) at load (appBundle.js:2405) at handleError (appBundle.js:2502) at load (appBundle.js:2376) at handleHashChange (appBundle.js:2939) at appBundle.js:3295

This is primarily because handleError is called without page as the first param here: https://github.com/rdkcentral/Lightning-SDK/blob/master/src/Router/index.js#L347 Then, the hash is passes as undefined to load in handleError which causes error when trying to get values from the hash.

erikhaandrikman commented 3 years ago

Sorry for the delay in picking up this ticket but this has been fixed in a newer release.