mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-11-14 01:34:49 +01:00
Fix broken history when eleemnt in update scene are optional
This commit is contained in:
@@ -3907,6 +3907,7 @@ class App extends React.Component<AppProps, AppState> {
|
||||
const { elements, appState, collaborators, captureUpdate } = sceneData;
|
||||
|
||||
if (captureUpdate) {
|
||||
const nextElements = elements ? elements : undefined;
|
||||
const observedAppState = appState
|
||||
? getObservedAppState({
|
||||
...this.store.snapshot.appState,
|
||||
@@ -3916,7 +3917,7 @@ class App extends React.Component<AppProps, AppState> {
|
||||
|
||||
this.store.scheduleMicroAction({
|
||||
action: captureUpdate,
|
||||
elements: elements ?? [],
|
||||
elements: nextElements,
|
||||
appState: observedAppState,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user