From 0a3e46b88d7964d6f06e2cfd642f31fde1c7b2d4 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Mon, 26 Aug 2013 09:26:07 -0600 Subject: [PATCH] Remove unnecessary cast and save 15 bytes using goog.isDef --- src/ol/parser/geojson.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ol/parser/geojson.js b/src/ol/parser/geojson.js index 6943cebcc2..31d2af9624 100644 --- a/src/ol/parser/geojson.js +++ b/src/ol/parser/geojson.js @@ -150,8 +150,8 @@ ol.parser.GeoJSON.prototype.parseAsFeatureCollection_ = function(json, } } var projection = 'EPSG:4326'; - if (json.hasOwnProperty('crs')) { - var crs = /** GeoJSONCRS */ (json.crs); + if (goog.isDef(json.crs)) { + var crs = json.crs; if (crs.type === 'name') { projection = (/** GeoJSONCRSName */ (crs.properties)).name; }