-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Description
I (accidentally) just upgraded to the latest release, and suddenly my tests won't pass with this error:
Error: Default value (false) for parameter 'error' is not an instance of Type (any)
at $$getDefaultValue (./vendor/angular-ui-router/release/angular-ui-router.js:1628)
at $value (./vendor/angular-ui-router/release/angular-ui-router.js:1643)
at ./vendor/angular-ui-router/release/angular-ui-router.js:1686
at forEach (./vendor/angular/angular.js:323)
at ./vendor/angular-ui-router/release/angular-ui-router.js:1687
at transitionTo (./vendor/angular-ui-router/release/angular-ui-router.js:3148)
at go (./vendor/angular-ui-router/release/angular-ui-router.js:3069)
at ./build/connect/js/app/routes/error/error.route.js:5:0 <- null:0:0
at check (./vendor/angular-ui-router/release/angular-ui-router.js:2008)
at update (./vendor/angular-ui-router/release/angular-ui-router.js:2020)
at ./vendor/angular/angular.js:14712
at ./src/connect/app/routes/routes.spec.js:30
I don't mind fixing the issue (it worked without error on 0.2.13), but this is a breaking change on a what should be a patch release.
The faulty code in question looks like this:
$stateProvider.state('error', {
params: {
error: false,
fromState: {},
fromParams: {},
toState: {},
toParams: {},
},
//...
Actually, on reading through the docs again, this seems like it should be an acceptable format, so this might actually be a legitimate bug.