From 952bc14fb9cf09e1f319fcc20101b02ac14b25dc Mon Sep 17 00:00:00 2001 From: davidkao0902 Date: Tue, 4 Aug 2020 17:46:17 +0000 Subject: [PATCH 1/2] fixed error when creating new video --- .../manager/src/js/components/VideoEditor/VideoForm.js | 8 ++++++-- setup.py | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dispatch/static/manager/src/js/components/VideoEditor/VideoForm.js b/dispatch/static/manager/src/js/components/VideoEditor/VideoForm.js index f2438511a..24059f88a 100644 --- a/dispatch/static/manager/src/js/components/VideoEditor/VideoForm.js +++ b/dispatch/static/manager/src/js/components/VideoEditor/VideoForm.js @@ -8,8 +8,12 @@ import * as Form from '../Form' export default function VideoForm(props) { let youtubeRegex = /(https?:\/\/)?(www\.)?(youtube|youtu|youtube-nocookie)\.(com|be)\/(watch\?v=|embed\/|v\/|.+\?v=)?([A-Za-z0-9\-=_]{11})/; - let match = props.listItem.url.match(youtubeRegex); - let youtubeVideoID = match[match.length - 1]; + let match = ''; + let youtubeVideoID = ''; + if(props.listItem.url != undefined) { + match = props.listItem.url.match(youtubeRegex); + youtubeVideoID = match[match.length - 1]; + } return ( diff --git a/setup.py b/setup.py index e49a15b72..80a002ac2 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup(name='dispatch', description='A publishing platform for modern newspapers', - version='1.3.5', + version='1.3.6', url='https://github.com/ubyssey/dispatch', author='Peter Siemens', author_email='peterjsiemens@gmail.com', From 378bdb034dab89e9af8562dc450d729d8addf60e Mon Sep 17 00:00:00 2001 From: davidkao0902 Date: Tue, 4 Aug 2020 17:55:33 +0000 Subject: [PATCH 2/2] version change to 1.3.5 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 80a002ac2..e49a15b72 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup(name='dispatch', description='A publishing platform for modern newspapers', - version='1.3.6', + version='1.3.5', url='https://github.com/ubyssey/dispatch', author='Peter Siemens', author_email='peterjsiemens@gmail.com',