@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.
Files changed (2) hide show
  1. package/dist/index.js +11 -2
  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
- const file = await item.getAsFileSystemHandle();
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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/virtual-dom",
3
- "version": "9.5.0",
3
+ "version": "9.6.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/lvce-editor/virtual-dom.git"