Skip to content

Commit

Permalink
Removed improper usage of Array includes (not supported on IE) (#1256)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbarto authored Nov 8, 2016
1 parent 4c91c36 commit 64b5b84
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion web/client/components/data/featuregrid/FeatureGrid.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ const FeatureGrid = React.createClass({
let selectedId = this.props.highlightedFeatures;
let me = this;
this.api.forEachNode((n) => {
if (selectedId.includes(n.data.id)) {
if (selectedId.indexOf(n.data.id) !== -1) {
me.api.selectNode(n, true, true);
}else if (me.api.isNodeSelected(n)) {
me.suppresSelectionEvent = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ const HighlightFeatureSupport = React.createClass({
this._selectedFeatures.map((f) => {this._layer.resetStyle(f); });
this._selectedFeatures = [];
this._layer.eachLayer((l)=> {
if (features.includes(l.msId)) {
if (features.indexOf(l.msId) !== -1) {
this._selectedFeatures.push(l);
l.bringToFront();
l.setStyle(this.props.selectedStyle);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ const HighlightFeatureSupport = React.createClass({
if (layer) {
let ft = layer.getSource().getFeatures();
ft.map((f)=> {
if (features.includes(f.getId())) {
if (features.indexOf(f.getId()) !== -1) {
ftColl.push(f);
}
}, this);
Expand Down
2 changes: 1 addition & 1 deletion web/client/components/maps/forms/Thumbnail.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ const Thumbnail = React.createClass({
this.getDataUri(this.files, callback);
},
deleteThumbnail(thumbnail, mapId) {
if (thumbnail && thumbnail.includes("geostore")) {
if (thumbnail && thumbnail.indexOf("geostore") !== -1) {
// this doesn't work if the URL is not encoded (because of GeoStore / Tomcat parameter encoding issues)
let start = (thumbnail).indexOf("data%2F") + 7;
let end = (thumbnail).indexOf("%2Fraw");
Expand Down

0 comments on commit 64b5b84

Please sign in to comment.