Skip to content
This repository was archived by the owner on Dec 23, 2021. It is now read-only.

Remove unneeded lines of code #74

Merged
merged 1 commit into from
Jul 30, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/view/components/Simulator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,29 +189,25 @@ class Simulator extends React.Component<any, IState> {
const ButtonAB: boolean = button.id.match(/BTN_AB/) !== null;
let innerButton;
let newState;
let cpxState = this.state.cpx;

if (ButtonAB) {
innerButton = window.document.getElementById("BTN_AB_INNER");
newState = {
button_a: active,
button_b: active
};
cpxState = { ...cpxState, ...newState };
this.setState({ ...this.state, ...newState });
} else if (ButtonA) {
innerButton = window.document.getElementById("BTN_A_INNER");
newState = {
button_a: active
};
cpxState = { ...cpxState, ...newState };
this.setState({ ...this.state, ...newState });
} else if (ButtonB) {
innerButton = window.document.getElementById("BTN_B_INNER");
newState = {
button_b: active
};
cpxState = { ...cpxState, ...newState };
this.setState({ ...this.state, ...newState });
}

Expand Down