fix(upload): fix process is not defined when using vite (#3930)

This commit is contained in:
Carter Li 2021-04-14 10:38:42 +08:00 committed by GitHub
parent 44e73cf460
commit 07ba6e48c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -70,7 +70,7 @@ export default defineComponent({
fileList: nextFileList,
});
// fix ie progress
if (!window.File || process.env.TEST_IE) {
if (!window.File || (typeof process === 'object' && process.env.TEST_IE)) {
this.autoUpdateProgress(0, targetItem);
}
},