Commit e4e80f91 authored by Phil Booth's avatar Phil Booth

fix(code): handle error when attempting to coerce in isInteger

parent 557cdb78
......@@ -69,7 +69,13 @@ function isPositiveInteger (thing) {
}
function isInteger (thing) {
return +thing % 1 === 0
try {
return +thing % 1 === 0
} catch (error) {
// Coercing symbols to numbers throws an error
}
return false
}
function getIndex (key, size) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment