Skip to content

Commit

Permalink
UI: fix reference to 'inControl' state in unselect shapes action
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
elmjag authored and marcus-oscarsson committed Feb 2, 2024
1 parent 96f549e commit 1a0cc1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/src/actions/sampleview.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1a0cc1f

Please sign in to comment.