normalize before replacing

This commit is contained in:
Ryan Di 2023-12-01 15:58:49 +08:00
parent 00ffa08e28
commit 1e132e33ae
3 changed files with 93 additions and 108 deletions

View file

@ -43,7 +43,6 @@ import {
measureBaseline,
} from "../element/textElement";
import { normalizeLink } from "./url";
import { normalizeFractionalIndexing } from "../zindex";
type RestoredAppState = Omit<
AppState,
@ -583,9 +582,7 @@ export const restore = (
elementsConfig?: { refreshDimensions?: boolean; repairBindings?: boolean },
): RestoredDataState => {
return {
elements: normalizeFractionalIndexing(
restoreElements(data?.elements, localElements, elementsConfig),
),
elements: restoreElements(data?.elements, localElements, elementsConfig),
appState: restoreAppState(data?.appState, localAppState || null),
files: data?.files || {},
};