Replace goog.isDefAndNotNull() with truthy checks

This commit is contained in:
Tim Schaub
2015-09-27 11:41:17 -06:00
parent 8209ed0a4c
commit ac7db89a91
24 changed files with 45 additions and 45 deletions

View File

@@ -484,7 +484,7 @@ ol.format.GeoJSON.prototype.readProjection;
ol.format.GeoJSON.prototype.readProjectionFromObject = function(object) {
var geoJSONObject = /** @type {GeoJSONObject} */ (object);
var crs = geoJSONObject.crs;
if (goog.isDefAndNotNull(crs)) {
if (crs) {
if (crs.type == 'name') {
return ol.proj.get(crs.properties.name);
} else if (crs.type == 'EPSG') {
@@ -530,11 +530,11 @@ ol.format.GeoJSON.prototype.writeFeatureObject = function(
'type': 'Feature'
};
var id = feature.getId();
if (goog.isDefAndNotNull(id)) {
if (id) {
object['id'] = id;
}
var geometry = feature.getGeometry();
if (goog.isDefAndNotNull(geometry)) {
if (geometry) {
object['geometry'] =
ol.format.GeoJSON.writeGeometry_(geometry, opt_options);
} else {