mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
retain local appState props on restore (#2224)
Co-authored-by: Lipis <lipiridis@gmail.com>
This commit is contained in:
parent
b91f929503
commit
7618ca48d7
9 changed files with 153 additions and 69 deletions
|
@ -599,9 +599,13 @@ class App extends React.Component<ExcalidrawProps, AppState> {
|
|||
) {
|
||||
// Backwards compatibility with legacy url format
|
||||
if (id) {
|
||||
scene = await loadScene(id);
|
||||
scene = await loadScene(id, null, this.props.initialData);
|
||||
} else if (jsonMatch) {
|
||||
scene = await loadScene(jsonMatch[1], jsonMatch[2]);
|
||||
scene = await loadScene(
|
||||
jsonMatch[1],
|
||||
jsonMatch[2],
|
||||
this.props.initialData,
|
||||
);
|
||||
}
|
||||
if (!isCollaborationScene) {
|
||||
window.history.replaceState({}, "Excalidraw", window.location.origin);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue