mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: support d&d of files without extension (#3168)
This commit is contained in:
parent
b081a09962
commit
8670b2d587
2 changed files with 14 additions and 27 deletions
|
@ -1,5 +1,5 @@
|
|||
import { cleanAppStateForExport } from "../appState";
|
||||
import { EXPORT_DATA_TYPES, MIME_TYPES } from "../constants";
|
||||
import { EXPORT_DATA_TYPES } from "../constants";
|
||||
import { clearElementsForExport } from "../element";
|
||||
import { CanvasError } from "../errors";
|
||||
import { t } from "../i18n";
|
||||
|
@ -95,13 +95,7 @@ export const loadFromBlob = async (
|
|||
elements: clearElementsForExport(data.elements || []),
|
||||
appState: {
|
||||
theme: localAppState?.theme,
|
||||
fileHandle:
|
||||
blob.handle &&
|
||||
["application/json", MIME_TYPES.excalidraw].includes(
|
||||
getMimeType(blob),
|
||||
)
|
||||
? blob.handle
|
||||
: null,
|
||||
fileHandle: blob.handle ?? null,
|
||||
...cleanAppStateForExport(data.appState || {}),
|
||||
...(localAppState
|
||||
? calculateScrollCenter(data.elements || [], localAppState, null)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue