diff options
Diffstat (limited to 'src/data')
-rw-r--r-- | src/data/validators.js | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/data/validators.js b/src/data/validators.js index 46dd292d..987f806d 100644 --- a/src/data/validators.js +++ b/src/data/validators.js @@ -643,10 +643,15 @@ export function isDimensions(dimensions) { if (dimensions.length !== 2) throw new TypeError(`Expected 2 item array`); - isPositive(dimensions[0]); - isInteger(dimensions[0]); - isPositive(dimensions[1]); - isInteger(dimensions[1]); + if (dimensions[0] !== null) { + isPositive(dimensions[0]); + isInteger(dimensions[0]); + } + + if (dimensions[1] !== null) { + isPositive(dimensions[1]); + isInteger(dimensions[1]); + } return true; } |