brouter-web/js/format
Henrik Fehlauer 8809fa94cf
Prevent Gpsies-style export from throwing for undefined symbols
While abrensch/brouter@82fecf9 fixed the export already by avoiding the
problematic `OFFR` voice hint, we would still throw in case we
encountered an `undefined` symbol entry:

> Uncaught TypeError: Cannot read properties of undefined (reading
> 'toLowerCase')

This can be prevented by not calling `toLowerCase()` on `undefined`
objects.

Fixes #751

Test Plan:
  - Change `VoiceHints.commands` to contain `undefined` entries for a
  particular voice hint.
  - Create a route with that voice hint.
  - Test that exporting for each `turnInstructionMode` does not throw.
2023-07-08 09:50:13 +00:00
..
Csv.js Format CSV 2021-04-01 12:17:18 +02:00
Fit.js Added new export as FIT file format fixes #322 2022-09-14 21:02:50 +02:00
Gpx.js Add GPX link (brouter#152) 2022-08-02 20:02:23 +02:00
Kml.js Format KML 2021-04-01 11:53:17 +02:00
VoiceHints.js Prevent Gpsies-style export from throwing for undefined symbols 2023-07-08 09:50:13 +00:00
Xml.js Break after self-closing trkpt without ele (beeline) 2021-06-12 11:11:08 +02:00