Skip to content

Commit

Permalink
fix: don't use global on client-side (#278)
Browse files Browse the repository at this point in the history
  • Loading branch information
atinux authored Sep 12, 2024
1 parent a44be77 commit 8891a76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/blob/app/composables/useUpload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function useUpload(apiBase: string, options: UploadOptions = {}) {
if (data instanceof File) {
files = [data]
}
if (global.FileList && data instanceof FileList) {
if (typeof FileList !== 'undefined' && data instanceof FileList) {
files = Array.from(data)
}
if (!files || !(files as Array<File>).length) {
Expand Down

0 comments on commit 8891a76

Please sign in to comment.