Skip to content
This repository was archived by the owner on May 26, 2023. It is now read-only.

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

Lines changed: 1 addition & 1 deletion
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)