Inline simple !goog.isDef() checks
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user