@lvce-editor/virtual-dom 9.5.0 → 9.6.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/index.js +11 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -135,9 +135,18 @@ const unwrapItemString = async item => {
|
|
|
135
135
|
};
|
|
136
136
|
const unwrapItemFile = async item => {
|
|
137
137
|
// @ts-ignore
|
|
138
|
-
|
|
138
|
+
if (item.getAsFileSystemHandle) {
|
|
139
|
+
// @ts-ignore
|
|
140
|
+
const file = await item.getAsFileSystemHandle();
|
|
141
|
+
return {
|
|
142
|
+
kind: 'file',
|
|
143
|
+
type: item.type,
|
|
144
|
+
value: file
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
const file = item.getAsFile();
|
|
139
148
|
return {
|
|
140
|
-
kind: 'file',
|
|
149
|
+
kind: 'file-legacy',
|
|
141
150
|
type: item.type,
|
|
142
151
|
value: file
|
|
143
152
|
};
|