Skip to content

Commit 61728d7

Browse files
fix(urlMatcherFactory): Check for null in int.is()
Fixes message: Cannot read property 'toString' of null Closes #3197
1 parent ba077aa commit 61728d7

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
@@ -610,7 +610,7 @@ function $UrlMatcherFactory() {
610610
"int": {
611611
encode: valToString,
612612
decode: function(val) { return parseInt(val, 10); },
613-
is: function(val) { return isDefined(val) && this.decode(val.toString()) === val; },
613+
is: function(val) { return val !== undefined && val !== null && this.decode(val.toString()) === val; },
614614
pattern: /\d+/
615615
},
616616
"bool": {

0 commit comments

Comments
 (0)