Skip to content

Commit 0b90362

Browse files
fix(urlMatcherFactory): Fixed a case where val can be null
Kudos to @pjotrd angular-ui#2071
1 parent 38704fd commit 0b90362

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/urlMatcherFactory.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ function $UrlMatcherFactory() {
579579
decode: valFromString,
580580
// TODO: in 1.0, make string .is() return false if value is undefined/null by default.
581581
// In 0.2.x, string params are optional by default for backwards compat
582-
is: function(val) { return (val == null || !isDefined(val) || typeof val === "string") && (val.toString().indexOf(slashReplacement) === -1); },
582+
is: function(val) { return val == null || !isDefined(val) || (isString(val) && val.indexOf(slashReplacement) === -1); },
583583
pattern: /[^/]*/
584584
},
585585
int: {

0 commit comments

Comments
 (0)