change [].includes to [].indexOf !== -1 for compatibility with node 4

This commit is contained in:
Kajari Ghosh 2018-12-10 17:09:18 -05:00
parent 925e75e287
commit a3812bc0a8

View File

@ -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();