From f04a7101ee4a4b88e2ccb56c9099568ddc861415 Mon Sep 17 00:00:00 2001 From: ntr Date: Sun, 5 May 2019 16:43:29 +1000 Subject: [PATCH] Revert "better hints" This reverts commit 0f5032becb67a37d5528c2a29af8fd627dd8a5e1. --- client/src/components/vbox.component.jsx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/client/src/components/vbox.component.jsx b/client/src/components/vbox.component.jsx index 8448a5af..6462bdb5 100644 --- a/client/src/components/vbox.component.jsx +++ b/client/src/components/vbox.component.jsx @@ -131,15 +131,13 @@ function Vbox(args) { function boundClick(e, i) { if (reclaiming && vbox.bound[i]) sendVboxReclaim(i); else if (vbox.bound[i]) { - boundTimer = null; - if (['Red', 'Green', 'Blue'].includes(vbox.bound[i])) { - const insert = combiner.findIndex(j => j === null); - if (insert === 2 || insert === -1) return setCombiner([i, null, combiner[2]]); - combiner[insert] = i; - } else { - combiner[2] = i; - } + const insert = ['Red', 'Green', 'Blue'].includes(vbox.bound[i]) + ? combiner.findIndex(j => j === null) + : 2; + if (insert === -1) return setCombiner([i, null, null]); + combiner[insert] = i; + boundTimer = null; return setCombiner(combiner); } return false;