abstract-state-router
Advanced tools
Comparing version 5.14.0 to 5.14.1
@@ -0,1 +1,5 @@ | ||
# [5.14.1](https://github.com/TehShrike/abstract-state-router/releases/tag/v5.14.1) | ||
- bug fix: empty strings in default parameters would cause the state router to stop cold without any error message [#2abf9361](https://github.com/TehShrike/abstract-state-router/commit/2abf936172271369c07413f47c9917dd9d36c005) | ||
# [5.14.0](https://github.com/TehShrike/abstract-state-router/releases/tag/v5.14.0) | ||
@@ -2,0 +6,0 @@ |
@@ -229,3 +229,3 @@ var StateState = require('./lib/state-state') | ||
var needToApplyDefaults = Object.keys(defaultParams).some(function missingParameterValue(param) { | ||
return !parameters[param] | ||
return typeof parameters[param] === 'undefined' | ||
}) | ||
@@ -232,0 +232,0 @@ |
{ | ||
"name": "abstract-state-router", | ||
"version": "5.14.0", | ||
"version": "5.14.1", | ||
"description": "The basics of a client-side state router ala the AngularJS ui-router, but without any DOM interactions", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -202,1 +202,26 @@ var test = require('tape-catch') | ||
}) | ||
test('empty string is a valid default parameter', function(t) { | ||
var state = getTestState(t) | ||
var stateRouter = state.stateRouter | ||
stateRouter.addState({ | ||
name: 'state', | ||
route: '/state', | ||
template: {}, | ||
defaultParameters: { | ||
someParam: '' | ||
}, | ||
querystringParameters: [ 'someParam' ], | ||
activate: function(context) { | ||
t.equal(context.parameters.someParam, '') | ||
t.equal(state.location.get(), '/state?someParam=') | ||
t.end() | ||
} | ||
}) | ||
stateRouter.go('state') | ||
}, { | ||
timeout: 1000 | ||
}) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
136329
3525