Skip to content

Commit dd62e39

Browse files
authored
code length validation
1 parent 7278c63 commit dd62e39

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/src/openlocationcode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@
286286
throw ('ValueError: Parameters are not numbers');
287287
}
288288
if (codeLength < 2 ||
289-
(codeLength < SEPARATOR_POSITION_ && codeLength % 2 == 1)) {
289+
(codeLength < PAIR_CODE_LENGTH_ && codeLength % 2 == 1)) {
290290
throw 'IllegalArgumentException: Invalid Open Location Code length';
291291
}
292292
// Ensure that latitude and longitude are valid.

0 commit comments

Comments
 (0)