Skip to content

Commit

Permalink
replace indexOf with dojo's array.indexOf for compatibility with IE8.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcgee committed Nov 23, 2015
1 parent a176c14 commit f809998
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions viewer/js/gis/dijit/Identify.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ define([
// Identify (Feature Service), create an
// infoTemplate for the graphic features. Create
// it only if one does not already exist.
if (layer.capabilities && layer.capabilities.toLowerCase().indexOf('data') < 0) {
if (layer.capabilities && array.indexOf(layer.capabilities.toLowerCase(), 'data') < 0) {
if (!layer.infoTemplate) {
var infoTemplate = this.getInfoTemplate(layer, layer.layerId);
if (infoTemplate) {
Expand Down Expand Up @@ -200,7 +200,7 @@ define([
// handle feature layers that come from a feature service
// and may already have an info template
var layer = evt.graphic._layer;
if (layer.infoTemplate || (layer.capabilities && layer.capabilities.toLowerCase().indexOf('data') < 0)) {
if (layer.infoTemplate || (layer.capabilities && array.indexOf(layer.capabilities.toLowerCase(), 'data') < 0)) {
return false;
}

Expand Down Expand Up @@ -262,7 +262,7 @@ define([
} else if ((ref.declaredClass === 'esri.layers.FeatureLayer') && !isNaN(ref.layerId)) { // feature layer
// do not allow feature layer that does not support
// Identify (Feature Service)
if (ref.capabilities && ref.capabilities.toLowerCase().indexOf('data') > 0) {
if (ref.capabilities && array.indexOf(ref.capabilities.toLowerCase(), 'data') >= 0) {
layerIds = [ref.layerId];
}
} else if (ref.layerInfos) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ define([
postCreate: function () {
this.inherited(arguments);
// Should the control be visible or hidden?
if (this.control.controlOptions.layerIds && this.control.controlOptions.layerIds.indexOf(this.sublayerInfo.id) < 0) {
if (this.control.controlOptions.layerIds && array.indexOf(this.control.controlOptions.layerIds, this.sublayerInfo.id) < 0) {
domClass.add(this.domNode, 'layerControlHidden');
}
var checkNode = this.checkNode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ define([
postCreate: function () {
this.inherited(arguments);
// Should the control be visible or hidden?
if (this.control.controlOptions.layerIds && this.control.controlOptions.layerIds.indexOf(this.sublayerInfo.id) < 0) {
if (this.control.controlOptions.layerIds && array.indexOf(this.control.controlOptions.layerIds, this.sublayerInfo.id) < 0) {
domClass.add(this.domNode, 'layerControlHidden');
}
var checkNode = this.checkNode;
Expand Down

0 comments on commit f809998

Please sign in to comment.