diff --git a/ui/component/publishFile/view.jsx b/ui/component/publishFile/view.jsx index 21691c7de..ac4e504a6 100644 --- a/ui/component/publishFile/view.jsx +++ b/ui/component/publishFile/view.jsx @@ -181,15 +181,15 @@ function PublishFile(props: Props) { setOversized(false); // select file, start to select a new one, then cancel - if (!file || !file.type) { + if (!file) { updatePublishForm({ filePath: '', name: '' }); return; } // if video, extract duration so we can warn about bitrateif (typeof file !== 'string') { - const contentType = file.type.split('/'); - const isVideo = contentType[0] === 'video'; - const isMp4 = contentType[1] === 'mp4'; + const contentType = file.type && file.type.split('/'); + const isVideo = contentType && contentType[0] === 'video'; + const isMp4 = contentType && contentType[1] === 'mp4'; if (isVideo) { if (isMp4) { const video = document.createElement('video'); diff --git a/ui/page/fileListPublished/view.jsx b/ui/page/fileListPublished/view.jsx index 07b231559..497c5ff34 100644 --- a/ui/page/fileListPublished/view.jsx +++ b/ui/page/fileListPublished/view.jsx @@ -55,27 +55,34 @@ function FileListPublished(props: Props) { return ( - - -