commit 1cfcc6caa6da1f165d298783db43f79a453a4f17 parent 62fabe54f4e75a5dbf1503c832d3c77d28b20459 Author: Sergej Orlov <wladimirych@gmail.com> Date: Wed, 23 Oct 2019 09:11:01 +0200 tracks: in movescount parser handle response without <title> Diffstat:
M | src/lib/leaflet.control.track-list/lib/services/movescount.js | | | 7 | +++++-- |
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/lib/leaflet.control.track-list/lib/services/movescount.js b/src/lib/leaflet.control.track-list/lib/services/movescount.js @@ -93,9 +93,12 @@ class MovescountMove extends MovescountBase { }) ); + const dom = (new DOMParser()).parseFromString(pageResponse.responseBinaryText, "text/html"); - const title = dom.querySelector('title').text.trim(); - name = title ? title : name; + try { + const title = dom.querySelector('title').text.trim(); + name = title ? title : name; + } catch (_) {} return [{ name,