瀏覽代碼

remove window reference — failing in Node.js

Artur Paikin 3 年之前
父節點
當前提交
16730c8f4b
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      packages/@uppy/core/src/index.js

+ 1 - 1
packages/@uppy/core/src/index.js

@@ -21,7 +21,7 @@ class RestrictionError extends Error {
     this.isRestriction = true
     this.isRestriction = true
   }
   }
 }
 }
-if (typeof window.AggregateError === 'undefined') {
+if (typeof AggregateError === 'undefined') {
   // eslint-disable-next-line no-global-assign
   // eslint-disable-next-line no-global-assign
   AggregateError = class AggregateError extends Error {
   AggregateError = class AggregateError extends Error {
     constructor (message, errors) {
     constructor (message, errors) {