@lvce-editor/renderer-process 24.2.0 → 24.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/rendererProcessMain.js +12 -8
- package/package.json +1 -1
|
@@ -304,9 +304,18 @@ const unwrapItemString = async item => {
|
|
|
304
304
|
};
|
|
305
305
|
const unwrapItemFile = async item => {
|
|
306
306
|
// @ts-ignore
|
|
307
|
-
|
|
307
|
+
if (item.getAsFileSystemHandle) {
|
|
308
|
+
// @ts-ignore
|
|
309
|
+
const file = await item.getAsFileSystemHandle();
|
|
310
|
+
return {
|
|
311
|
+
kind: 'file',
|
|
312
|
+
type: item.type,
|
|
313
|
+
value: file
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
const file = item.getAsFile();
|
|
308
317
|
return {
|
|
309
|
-
kind: 'file',
|
|
318
|
+
kind: 'file-legacy',
|
|
310
319
|
type: item.type,
|
|
311
320
|
value: file
|
|
312
321
|
};
|
|
@@ -10026,11 +10035,6 @@ const getIsFirefox = () => {
|
|
|
10026
10035
|
return navigator.userAgent.toLowerCase().includes('firefox');
|
|
10027
10036
|
};
|
|
10028
10037
|
|
|
10029
|
-
/**
|
|
10030
|
-
* @type {boolean}
|
|
10031
|
-
*/
|
|
10032
|
-
const isFirefox = getIsFirefox();
|
|
10033
|
-
|
|
10034
10038
|
const getErrorMessage = error => {
|
|
10035
10039
|
if (!error) {
|
|
10036
10040
|
return `Error: ${error}`;
|
|
@@ -10128,7 +10132,7 @@ const prepare = async error => {
|
|
|
10128
10132
|
return error;
|
|
10129
10133
|
};
|
|
10130
10134
|
const print = (error$1, prefix = '') => {
|
|
10131
|
-
if (
|
|
10135
|
+
if (getIsFirefox()) {
|
|
10132
10136
|
// Firefox does not support printing codeframe with error stack
|
|
10133
10137
|
if (error$1 && error$1._error) {
|
|
10134
10138
|
error(`${prefix}${error$1._error}`);
|