From 1a0cc1f44ec854338ed41140fa0053783bca948b Mon Sep 17 00:00:00 2001 From: Elmir Jagudin Date: Thu, 1 Feb 2024 18:44:02 +0100 Subject: [PATCH] UI: fix reference to 'inControl' state in unselect shapes action When checking if current user is in control, use correct object 'paths' and attribute name to read 'inControl' flag from the current state. This solves issues with 3-click centering not starting due to a JavaScript error. --- ui/src/actions/sampleview.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/src/actions/sampleview.js b/ui/src/actions/sampleview.js index 99cc5948c..c86ae20aa 100644 --- a/ui/src/actions/sampleview.js +++ b/ui/src/actions/sampleview.js @@ -426,9 +426,9 @@ export function sendDeleteShape(id) { export function unselectShapes(shapes) { return (dispatch, getState) => { - const login = getState(); + const state = getState(); - if (login.user.userInControl) { + if (state.login.user.inControl) { const _shapes = []; if (shapes.shapes !== undefined) { const keys = Object.keys(shapes.shapes);