From a090f84adbdbd74547f767e29f53509c326ffb04 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Fri, 13 Sep 2024 21:25:32 +0800 Subject: [PATCH] style: Fix coding style from eslint --- src/BasicDrawComponent.mjs | 2 +- src/mapclay.mjs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/BasicDrawComponent.mjs b/src/BasicDrawComponent.mjs index 48ae19c..9fd85a3 100644 --- a/src/BasicDrawComponent.mjs +++ b/src/BasicDrawComponent.mjs @@ -129,7 +129,7 @@ export const addSimpleSelector = (target, draw, options = {}) => { }); draw.on("finish", (id, context) => { if (context.action === 'draw') { - const feature = draw.getSnapshot().find(f => f.id == id) + const feature = draw.getSnapshot().find(feature => feature.id === id) if (feature) { draw.removeFeatures([id]) feature.properties.mode = "render" diff --git a/src/mapclay.mjs b/src/mapclay.mjs index fa6025f..e48ebfb 100644 --- a/src/mapclay.mjs +++ b/src/mapclay.mjs @@ -39,7 +39,7 @@ const parseConfigsFromYaml = (configText) => { } ) - if (configList.length == 0) throw Error('Not a valid config file') + if (configList.length === 0) throw Error('Not a valid config file') return configList }