fix
This commit is contained in:
+2
-2
@@ -1,4 +1,3 @@
|
||||
//@ts-nocheck
|
||||
import {
|
||||
ExcalidrawElement,
|
||||
ExcalidrawSelectionElement,
|
||||
@@ -393,7 +392,9 @@ export const restoreElements = (
|
||||
migratedElement = { ...migratedElement, id: randomId() };
|
||||
}
|
||||
existingIds.add(migratedElement.id);
|
||||
//@ts-ignore
|
||||
if (element.children?.length) {
|
||||
//@ts-ignore
|
||||
const newElements = updateElementChildren(element);
|
||||
if (newElements) {
|
||||
elements.push(...newElements);
|
||||
@@ -552,7 +553,6 @@ export const restore = (
|
||||
localElements: readonly ExcalidrawElement[] | null | undefined,
|
||||
elementsConfig?: { refreshDimensions?: boolean; repairBindings?: boolean },
|
||||
): RestoredDataState => {
|
||||
console.log(restoreElements(data?.elements, localElements, elementsConfig));
|
||||
return {
|
||||
elements: restoreElements(data?.elements, localElements, elementsConfig),
|
||||
appState: restoreAppState(data?.appState, localAppState || null),
|
||||
|
||||
+1
-3
@@ -1,4 +1,4 @@
|
||||
import { ExcalidrawElement, ExcalidrawTextContainer } from "../element/types";
|
||||
import { ExcalidrawElement } from "../element/types";
|
||||
import {
|
||||
AppState,
|
||||
BinaryFiles,
|
||||
@@ -8,8 +8,6 @@ import {
|
||||
import type { cleanAppStateForExport } from "../appState";
|
||||
import { VERSIONS } from "../constants";
|
||||
|
||||
import { ElementConstructorOpts } from "../element/newElement";
|
||||
|
||||
export interface ExportedDataState {
|
||||
type: string;
|
||||
version: number;
|
||||
|
||||
Reference in New Issue
Block a user