From ef593b65dff0cea537a220b034d98a476bfa6af7 Mon Sep 17 00:00:00 2001 From: Matt Watson Date: Sat, 4 May 2024 10:06:49 -0400 Subject: [PATCH] lint fix --- src/context/map-context.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/context/map-context.js b/src/context/map-context.js index 211bd0ab..f1814f91 100644 --- a/src/context/map-context.js +++ b/src/context/map-context.js @@ -44,23 +44,23 @@ export const LayersProvider = ({ children }) => { }; const removeLayer = id => { - const index = defaultModelLayers.findIndex(l => l.id === id) + const index = defaultModelLayers.findIndex(l => l.id === id); if (index === -1) { - return + return; } - const thisPosition = defaultModelLayers[index].state.order + const thisPosition = defaultModelLayers[index].state.order; const newLayers = defaultModelLayers.reduce((acc, l) => { if (l.state.order === thisPosition) { - return acc + return acc; } if (l.state.order > thisPosition) { l.state.order -= 1; } - acc.push(l) - return acc - }, []) + acc.push(l); + return acc; + }, []); - setDefaultModelLayers(newLayers) + setDefaultModelLayers(newLayers); /* todo: update `layer.state.order`s layer.state.order - 1 for all layers l with l.state.order > this layer's state.order */