Skip to content

Commit da7491d

Browse files
committed
add validity check in fullextent
1 parent 4dc1d32 commit da7491d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/map/spatial-reference/SpatialReference.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ export default class SpatialReference {
128128
fullExtent['bottom'] = fullExtent['ymin'];
129129
}
130130

131+
if (isNil(fullExtent['top']) || isNil(fullExtent['bottom']) || isNil(fullExtent['left']) || isNil(fullExtent['right'])) {
132+
throw new Error('must provide valid top/bottom/left/right in fullExtent.');
133+
}
134+
131135
//set left, right, top, bottom value
132136
extend(this._fullExtent, fullExtent);
133137

0 commit comments

Comments
 (0)