Skip to content

Commit

Permalink
mod: code review
Browse files Browse the repository at this point in the history
  • Loading branch information
hetao92 committed Dec 22, 2022
1 parent c9078b6 commit 569b2f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/pages/Import/FileUpload/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const FileUpload = () => {
const [loading, setLoading] = useState(false);
const transformFile = async (_file: StudioFile, fileList: StudioFile[]) => {
const size = fileList.reduce((acc, cur) => acc + cur.size, 0);
if(global.gConfig.maxBytes && size > global.gConfig.maxBytes) {
if(global.gConfig?.maxBytes && size > global.gConfig.maxBytes) {
message.error(intl.get('import.fileSizeLimit', { size: getFileSize(global.gConfig.maxBytes) }));
return false;
}
Expand Down

0 comments on commit 569b2f7

Please sign in to comment.