Skip to content

Commit

Permalink
chore: address review
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos committed Jul 23, 2021
1 parent 6526bf3 commit 5d7a089
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions file/src/lib.node.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
import { Blob } from "./package.js"
import { WebFile } from "./file.js"

// Electron-renderer has `XMLHttpRequest` and should get the browser implementation
// instead of node.
// Electron-renderer should get the browser implementation instead of node
// Browser configuration is not enough

// Marking export as a DOM File object instead of custom class.
/** @type {typeof globalThis.File} */
const File = typeof XMLHttpRequest === 'function' ? globalThis.File : WebFile
const File = typeof globalThis.File === 'function' ? globalThis.File : WebFile

export { File, Blob }

0 comments on commit 5d7a089

Please sign in to comment.