mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
temp hack fix for state updates (#593)
* temp hack fix state updates * switch setTimeout for state mutation
This commit is contained in:
parent
a862d12ac1
commit
187cfbe2d8
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue