diff --git a/src/extension.ts b/src/extension.ts index b36de1f12..1fdf70da0 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -279,7 +279,6 @@ export async function activate(context: vscode.ExtensionContext) { currentPanel, context ); - console.log("sent"); } currentPanel.onDidDispose( diff --git a/src/view/components/cpx/CpxSimulator.tsx b/src/view/components/cpx/CpxSimulator.tsx index 24cf1728b..b0d77f441 100644 --- a/src/view/components/cpx/CpxSimulator.tsx +++ b/src/view/components/cpx/CpxSimulator.tsx @@ -368,11 +368,12 @@ class Simulator extends React.Component<{}, IState> { } private handleSwitchClick() { - let cpxState = this.state.cpx; - const switchIsOn: boolean = !this.state.cpx.switch; + const switchIsOn = !this.state.cpx.switch; updateSwitch(switchIsOn); - cpxState = { ...cpxState, switch: switchIsOn }; - this.setState({ ...this.state, ...cpxState }); + this.setState({ + ...this.state, + cpx: { ...this.state.cpx, switch: switchIsOn }, + }); return { switch: switchIsOn }; }