Skip to content

Commit

Permalink
Guard state update
Browse files Browse the repository at this point in the history
  • Loading branch information
planger committed Mar 1, 2024
1 parent 84e1195 commit 00fcb3a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/webview/memory-webview-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ class App extends React.Component<{}, MemoryAppState> {
(this.state.addressPadding === 'Min' && this.state.memory !== prevState.memory)
|| this.state.addressPadding !== prevState.addressPadding;
if (addressPaddingNeedsUpdate) {
this.setState({ effectiveAddressLength: this.getEffectiveAddressLength(this.state.memory), });
const effectiveAddressLength = this.getEffectiveAddressLength(this.state.memory);
if (this.state.effectiveAddressLength !== effectiveAddressLength) {
this.setState({ effectiveAddressLength });
}
}
}

Expand Down

0 comments on commit 00fcb3a

Please sign in to comment.