Read file in the current window context before passing to backend
This commit is contained in:
parent
e417a3fda3
commit
300282e3b4
@ -107,11 +107,7 @@ function utilDatabaseDeleteDictionary(dictionaryName, onProgress) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function utilDatabaseImport(data, progress, details) {
|
async function utilDatabaseImport(data, progress, details) {
|
||||||
// Edge cannot read data on the background page due to the File object
|
|
||||||
// being created from a different window. Read on the same page instead.
|
|
||||||
if (EXTENSION_IS_BROWSER_EDGE) {
|
|
||||||
data = await utilReadFile(data);
|
data = await utilReadFile(data);
|
||||||
}
|
|
||||||
return utilBackend().translator.database.importDictionary(data, progress, details);
|
return utilBackend().translator.database.importDictionary(data, progress, details);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user