Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed improper usage of Array includes (not supported on IE) #1256

Merged
merged 1 commit into from
Nov 8, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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