xy-scale 1.3.7 → 1.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xy-scale",
3
- "version": "1.3.7",
3
+ "version": "1.3.8",
4
4
  "main": "./index.js",
5
5
  "type": "module",
6
6
  "scripts": {
package/src/validators.js CHANGED
@@ -21,9 +21,12 @@ export const validateFirstRow = row => {
21
21
 
22
22
  for(const [k, v] of Object.entries(row))
23
23
  {
24
- if (typeof v !== 'number' || Number.isNaN(v)) {
24
+ if (typeof v === 'number' && Number.isNaN(v)) {
25
25
  throw new Error(`Invalid value at index 0 property "${k}": value is "${v}". Expected a numeric value.`);
26
26
  }
27
+ if (v === null) {
28
+ throw new Error(`Invalid value at index 0 property "${k}": value is "${v}".`);
29
+ }
27
30
  }
28
31
 
29
32
  return true