Remove use of goog.object.containsKey
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
goog.provide('ol.geom.flat.geodesic');
|
||||
|
||||
goog.require('goog.asserts');
|
||||
goog.require('goog.object');
|
||||
goog.require('ol.TransformFunction');
|
||||
goog.require('ol.math');
|
||||
goog.require('ol.proj');
|
||||
@@ -49,7 +48,7 @@ ol.geom.flat.geodesic.line_ =
|
||||
a = stack.pop();
|
||||
// Add the a coordinate if it has not been added yet
|
||||
key = fracA.toString();
|
||||
if (!goog.object.containsKey(fractions, key)) {
|
||||
if (!(key in fractions)) {
|
||||
flatCoordinates.push(a[0], a[1]);
|
||||
fractions[key] = true;
|
||||
}
|
||||
@@ -68,7 +67,7 @@ ol.geom.flat.geodesic.line_ =
|
||||
// segment.
|
||||
flatCoordinates.push(b[0], b[1]);
|
||||
key = fracB.toString();
|
||||
goog.asserts.assert(!goog.object.containsKey(fractions, key),
|
||||
goog.asserts.assert(!(key in fractions),
|
||||
'fractions object should contain key : ' + key);
|
||||
fractions[key] = true;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user