christopherthielen / ui-router-extras

THIS PROJECT IS NO LONGER MAINTAINED -- Extras for UI-Router for AngularJS. Sticky States (a.k.a. parallel states), Deep State Redirect (for tab-like navigation), Future States (async state definition)
http://christopherthielen.github.io/ui-router-extras/
MIT License
917 stars 211 forks source link

TypeError: Cannot read property 'ignoreDsr' of undefined #304

Open chamnassi opened 8 years ago

chamnassi commented 8 years ago

When ct.ui.router.extras.dsr initialize.

$state.transitionTo = function (to, toParams, options) { if (options.ignoreDsr) { //if the options are undefined, will throw exception. ignoreDsr = options.ignoreDsr; } ... }

In my opinion, It is require undefined check. like this.. if (options && options.ignoreDsr) { ... }

//error stack angular.js:11655 TypeError: Cannot read property 'ignoreDsr' of undefined at Object.$state.transitionTo (ct-ui-router-extras.js:204) at Object.$state.transitionTo (ct-ui-router-extras.js:1726) at Object.$state.transitionTo (ct-ui-router-extras.js:1193) at app.main.js:13 at angular.js:9408 at processQueue (angular.js:13248) at angular.js:13264 at Scope.$eval (angular.js:14466) at Scope.$digest (angular.js:14282) at Scope.$apply (angular.js:14571)

danielschuetter commented 8 years ago

I created a pull request for the issue. See #307