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 }