mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: don't crash on drop highlighted text onto canvas (#4890)
This commit is contained in:
parent
20de06ef50
commit
4d5f00ff08
2 changed files with 7 additions and 4 deletions
|
@ -213,9 +213,12 @@ export class API {
|
|||
}
|
||||
});
|
||||
|
||||
const files = [blob] as File[] & { item: (index: number) => File };
|
||||
files.item = (index: number) => files[index];
|
||||
|
||||
Object.defineProperty(fileDropEvent, "dataTransfer", {
|
||||
value: {
|
||||
files: [blob],
|
||||
files,
|
||||
getData: (type: string) => {
|
||||
if (type === blob.type) {
|
||||
return text;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue