From a901c4fac48ed0a8297f37c4d0fde15e44983823 Mon Sep 17 00:00:00 2001 From: HunterBarclay Date: Sun, 15 Dec 2024 09:43:00 -0700 Subject: [PATCH] cleanup: Format fixes --- fission/src/aps/APS.ts | 4 ---- .../src/systems/simulation/wpilib_brain/WPILibBrain.ts | 10 ++++------ fission/src/ui/panels/simulation/WiringPanel.tsx | 6 ++++-- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/fission/src/aps/APS.ts b/fission/src/aps/APS.ts index d9ae0500e..ff6f1204a 100644 --- a/fission/src/aps/APS.ts +++ b/fission/src/aps/APS.ts @@ -339,10 +339,6 @@ class APS { email: json.email, } - if (json.sub) { - World.AnalyticsSystem?.SetUserId(json.sub as string) - } - this.userInfo = info } catch (e) { console.error(e) diff --git a/fission/src/systems/simulation/wpilib_brain/WPILibBrain.ts b/fission/src/systems/simulation/wpilib_brain/WPILibBrain.ts index 1493d4d69..122ed51ec 100644 --- a/fission/src/systems/simulation/wpilib_brain/WPILibBrain.ts +++ b/fission/src/systems/simulation/wpilib_brain/WPILibBrain.ts @@ -119,12 +119,10 @@ export function setSimBrain(brain: WPILibBrain | undefined) { if (simBrain) worker.getValue().postMessage({ command: "disable" }) simBrain = brain if (simBrain) - worker - .getValue() - .postMessage({ - command: "enable", - reconnect: PreferencesSystem.getGlobalPreference("SimAutoReconnect"), - }) + worker.getValue().postMessage({ + command: "enable", + reconnect: PreferencesSystem.getGlobalPreference("SimAutoReconnect"), + }) } export function hasSimBrain() { diff --git a/fission/src/ui/panels/simulation/WiringPanel.tsx b/fission/src/ui/panels/simulation/WiringPanel.tsx index f53a0cbfe..37fa01fc6 100644 --- a/fission/src/ui/panels/simulation/WiringPanel.tsx +++ b/fission/src/ui/panels/simulation/WiringPanel.tsx @@ -121,7 +121,8 @@ function generateGraph( console.warn("Orphaned handle found") return } - ((v.isSource ? node.data.output : node.data.input) as unknown[]).push(v) + const list = (v.isSource ? node.data.output : node.data.input) as unknown[] + list.push(v) }) Object.entries(simConfig.edges).forEach(([k, v]) => { @@ -147,7 +148,8 @@ function SimIOComponent({ setConfigState, simConfig }: ConfigComponentProps) { const simIn: HandleInfo[] = [] Object.entries(simConfig.handles).forEach(([_k, v]) => { if (v.nodeId == NODE_ID_SIM_OUT || v.nodeId == NODE_ID_SIM_IN) { - (v.isSource ? simOut : simIn).push(v) + const list = v.isSource ? simOut : simIn + list.push(v) } })