nakarte

Source code of https://map.sikmir.ru (fork)
git clone git://git.sikmir.ru/nakarte
Log | Files | Refs | LICENSE

commit c279a5476f581a92da16f400930d5936e5ab6f15
parent ad44fb8fcc2db74fc00882ca66374a2b206df916
Author: myadzel <myadzel@gmail.com>
Date:   Thu, 26 Mar 2020 20:20:42 +0300

tracedetrail parsing improvements #349

Diffstat:
Msrc/lib/leaflet.control.track-list/lib/services/tracedetrail.js | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/lib/leaflet.control.track-list/lib/services/tracedetrail.js b/src/lib/leaflet.control.track-list/lib/services/tracedetrail.js @@ -33,7 +33,13 @@ class Tracedetrail extends BaseService { tracks: [points] }]; } catch (e) { - return [{name, error: 'UNSUPPORTED'}]; + let error = 'UNSUPPORTED'; + + if (response.status === 200) { + error = `Track with id ${this.trackId} was deleted or did not exist`; + } + + return [{name, error}]; } } }