fix: don't crash on drop highlighted text onto canvas (#4890)
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user