Replace goog.array.contains with ol.array.includes
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
goog.provide('ol.format.GPX');
|
||||
|
||||
goog.require('goog.array');
|
||||
goog.require('goog.asserts');
|
||||
goog.require('goog.dom.NodeType');
|
||||
goog.require('ol.Feature');
|
||||
goog.require('ol.array');
|
||||
goog.require('ol.format.Feature');
|
||||
goog.require('ol.format.XMLFeature');
|
||||
goog.require('ol.format.XSD');
|
||||
@@ -449,7 +449,7 @@ ol.format.GPX.prototype.readFeature;
|
||||
ol.format.GPX.prototype.readFeatureFromNode = function(node, opt_options) {
|
||||
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
|
||||
'node.nodeType should be ELEMENT');
|
||||
if (!goog.array.contains(ol.format.GPX.NAMESPACE_URIS_, node.namespaceURI)) {
|
||||
if (!ol.array.includes(ol.format.GPX.NAMESPACE_URIS_, node.namespaceURI)) {
|
||||
return null;
|
||||
}
|
||||
var featureReader = ol.format.GPX.FEATURE_READER_[node.localName];
|
||||
@@ -483,7 +483,7 @@ ol.format.GPX.prototype.readFeatures;
|
||||
ol.format.GPX.prototype.readFeaturesFromNode = function(node, opt_options) {
|
||||
goog.asserts.assert(node.nodeType == goog.dom.NodeType.ELEMENT,
|
||||
'node.nodeType should be ELEMENT');
|
||||
if (!goog.array.contains(ol.format.GPX.NAMESPACE_URIS_, node.namespaceURI)) {
|
||||
if (!ol.array.includes(ol.format.GPX.NAMESPACE_URIS_, node.namespaceURI)) {
|
||||
return [];
|
||||
}
|
||||
if (node.localName == 'gpx') {
|
||||
|
||||
Reference in New Issue
Block a user