Remove unnecessary cast and save 15 bytes using goog.isDef
This commit is contained in:
@@ -150,8 +150,8 @@ ol.parser.GeoJSON.prototype.parseAsFeatureCollection_ = function(json,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
var projection = 'EPSG:4326';
|
var projection = 'EPSG:4326';
|
||||||
if (json.hasOwnProperty('crs')) {
|
if (goog.isDef(json.crs)) {
|
||||||
var crs = /** GeoJSONCRS */ (json.crs);
|
var crs = json.crs;
|
||||||
if (crs.type === 'name') {
|
if (crs.type === 'name') {
|
||||||
projection = (/** GeoJSONCRSName */ (crs.properties)).name;
|
projection = (/** GeoJSONCRSName */ (crs.properties)).name;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user