@wemap/geo 10.0.0 → 10.1.0

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
@@ -13,7 +13,7 @@
13
13
  "directory": "packages/geo"
14
14
  },
15
15
  "name": "@wemap/geo",
16
- "version": "10.0.0",
16
+ "version": "10.1.0",
17
17
  "bugs": {
18
18
  "url": "https://github.com/wemap/wemap-modules-js/issues"
19
19
  },
@@ -31,5 +31,5 @@
31
31
  "@wemap/logger": "^10.0.0",
32
32
  "@wemap/maths": "^10.0.0"
33
33
  },
34
- "gitHead": "dabdfdf7dbb6dcdf507ec148160ef228457b0519"
34
+ "gitHead": "881fa193f9c7bd2ea6a202bb207ca97cc0bac2dd"
35
35
  }
@@ -245,6 +245,10 @@ class Level {
245
245
  this.checkType(level);
246
246
  }
247
247
 
248
+ if (level === null) {
249
+ return null;
250
+ }
251
+
248
252
  return Array.isArray(level) ? [level[0] * factor, level[1] * factor] : level * factor;
249
253
  }
250
254
 
@@ -200,6 +200,7 @@ describe('Level', () => {
200
200
 
201
201
 
202
202
  it('multiplyBy', () => {
203
+ expect(Level.multiplyBy(null, 5)).equals(null);
203
204
  expect(Level.multiplyBy(0, 5)).equals(0);
204
205
  expect(Level.multiplyBy(2, 3)).equals(6);
205
206
  expect(Level.multiplyBy(5, -1)).equals(-5);