remove convertToExcalidrawElements call from restore

This commit is contained in:
Aakansha Doshi
2023-07-14 17:13:24 +05:30
parent 2ff0528a4f
commit d3361f910b
8 changed files with 128 additions and 151 deletions

View File

@@ -13,7 +13,6 @@ import { FileSystemHandle, nativeFileSystemSupported } from "./filesystem";
import { isValidExcalidrawData, isValidLibrary } from "./json";
import { restore, restoreLibraryItems } from "./restore";
import { ImportedLibraryData } from "./types";
import { convertToExcalidrawElements } from "../data/transform";
const parseFileContents = async (blob: Blob | File) => {
let contents: string;
@@ -135,9 +134,7 @@ export const loadSceneOrLibraryFromBlob = async (
try {
const data = JSON.parse(contents);
if (isValidExcalidrawData(data)) {
const excaldrawElements = convertToExcalidrawElements(
data.elements || [],
);
const excaldrawElements = data.elements || [];
return {
type: MIME_TYPES.excalidraw,
data: restore(