@wemap/geo 1.0.0 → 1.0.1

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
@@ -12,7 +12,7 @@
12
12
  "directory": "packages/geo"
13
13
  },
14
14
  "name": "@wemap/geo",
15
- "version": "1.0.0",
15
+ "version": "1.0.1",
16
16
  "bugs": {
17
17
  "url": "https://github.com/wemap/wemap-utils-js/issues"
18
18
  },
@@ -31,5 +31,5 @@
31
31
  "lodash.isnumber": "^3.0.3",
32
32
  "lodash.isstring": "^4.0.1"
33
33
  },
34
- "gitHead": "2a8dc4304fae3f175819ed1a1561a818e871cf44"
34
+ "gitHead": "f4d8fe98fff281533d884e0479894662c4dec9fe"
35
35
  }
@@ -96,11 +96,11 @@ class Level {
96
96
  }
97
97
 
98
98
  if (!second) {
99
- return first;
99
+ return null;
100
100
  }
101
101
 
102
102
  if (!first) {
103
- return second;
103
+ return null;
104
104
  }
105
105
 
106
106
  if (first.isRange && !second.isRange) {
@@ -137,8 +137,8 @@ describe('Level', () => {
137
137
  expect(Level.intersect(null, null)).is.null;
138
138
 
139
139
  const level = new Level(1);
140
- expect(Level.intersect(level, null)).equals(level);
141
- expect(Level.intersect(null, level)).equals(level);
140
+ expect(Level.intersect(level, null)).equals(null);
141
+ expect(Level.intersect(null, level)).equals(null);
142
142
  expect(Level.intersect(level, level)).equals(level);
143
143
 
144
144
  expect(Level.equalsTo(Level.intersect(new Level(0, 1), new Level(1)), new Level(1)));