Inline simple !goog.isDef() checks

This commit is contained in:
Tim Schaub
2015-09-27 10:23:30 -06:00
parent b36d697585
commit 6638ae855d
14 changed files with 27 additions and 27 deletions

View File

@@ -110,7 +110,7 @@ ol.proj.EPSG3857.fromEPSG4326 = function(input, opt_output, opt_dimension) {
var length = input.length,
dimension = opt_dimension > 1 ? opt_dimension : 2,
output = opt_output;
if (!goog.isDef(output)) {
if (output === undefined) {
if (dimension > 2) {
// preserve values beyond second dimension
output = input.slice();
@@ -141,7 +141,7 @@ ol.proj.EPSG3857.toEPSG4326 = function(input, opt_output, opt_dimension) {
var length = input.length,
dimension = opt_dimension > 1 ? opt_dimension : 2,
output = opt_output;
if (!goog.isDef(output)) {
if (output === undefined) {
if (dimension > 2) {
// preserve values beyond second dimension
output = input.slice();

View File

@@ -154,7 +154,7 @@ ol.proj.Projection = function(options) {
}
if (!goog.isDef(options.units)) {
var units = def.units;
if (!goog.isDef(units)) {
if (units === undefined) {
if (def.to_meter !== undefined) {
units = def.to_meter.toString();
ol.proj.METERS_PER_UNIT[units] = def.to_meter;
@@ -725,7 +725,7 @@ ol.proj.getTransformFromProjections =
goog.object.containsKey(transforms[sourceCode], destinationCode)) {
transform = transforms[sourceCode][destinationCode];
}
if (!goog.isDef(transform)) {
if (transform === undefined) {
goog.asserts.assert(goog.isDef(transform), 'transform should be defined');
transform = ol.proj.identityTransform;
}