Skip to content

Virtual whiteboard for sketching hand-drawn like diagrams

temp hack fix for state updates (#593)

David Luzar187cfbe2d80d
diff --git a/src/index.tsx b/src/index.tsx
index a6ed107d06..fc774a3019 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -226,8 +226,11 @@ export class App extends React.Component<any, AppState> {
this.saveDebounced.flush();
};
- public shouldComponentUpdate() {
+ public shouldComponentUpdate(props: any, nextState: AppState) {
if (!history.isRecording()) {
+ // temporary hack to fix #592
+ // eslint-disable-next-line react/no-direct-mutation-state
+ this.state = nextState;
this.componentDidUpdate();
return false;
}