change [].includes to [].indexOf !== -1 for compatibility with node 4
This commit is contained in:
parent
925e75e287
commit
a3812bc0a8
@ -21,7 +21,7 @@ function tableParse(table, noRoute, annotation, callback) {
|
|||||||
|
|
||||||
const parse = annotation == 'distances' ? distancesParse : (annotation == 'durations' ? durationsParse : estimatesParse);
|
const parse = annotation == 'distances' ? distancesParse : (annotation == 'durations' ? durationsParse : estimatesParse);
|
||||||
const params = this.queryParams;
|
const params = this.queryParams;
|
||||||
params.annotations = ['durations','estimated_cells'].includes(annotation) ? 'duration' : 'distance';
|
params.annotations = ['durations','estimated_cells'].indexOf(annotation) !== -1 ? 'duration' : 'distance';
|
||||||
|
|
||||||
var tableRows = table.raw();
|
var tableRows = table.raw();
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user