From c06cc2f520203ff24ca6395b8c0fdc09cf656152 Mon Sep 17 00:00:00 2001 From: razdravan Date: Sat, 27 May 2023 00:39:40 +0200 Subject: [PATCH] Fixed lint issues. --- .eslintrc | 3 ++- src/lib/popup.js | 2 +- src/ui/map/clickable_marker.js | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.eslintrc b/.eslintrc index 31a6a34aa..b5b2bd407 100644 --- a/.eslintrc +++ b/.eslintrc @@ -17,7 +17,8 @@ }, "globals": { "Base64": true, - "d3": true + "d3": true, + "makiNames": true }, "parserOptions": { "ecmaVersion": 9, diff --git a/src/lib/popup.js b/src/lib/popup.js index 5e0501058..45015176a 100644 --- a/src/lib/popup.js +++ b/src/lib/popup.js @@ -114,7 +114,7 @@ module.exports = function (context) { .attr('value', 'circle') .attr('list', 'marker-symbol'); const datalist = td.append('datalist').attr('id', 'marker-symbol'); - for (var i = 0; i < makiNames.length; i++) { + for (let i = 0; i < makiNames.length; i++) { datalist.append('option').attr('value', makiNames[i]); } } diff --git a/src/ui/map/clickable_marker.js b/src/ui/map/clickable_marker.js index 2cc49f850..2b53490dd 100644 --- a/src/ui/map/clickable_marker.js +++ b/src/ui/map/clickable_marker.js @@ -11,7 +11,7 @@ class ClickableMarker extends mapboxgl.Marker { } = options if ( - symbol != "circle" && + symbol != "circle" && (makiNames.includes(symbol) || /^[a-z0-9]$/.test(symbol)) ) { const symbolPath = document.createElement('path');