From d0d1feca1818f8edf91aa1150eafea15882e156c Mon Sep 17 00:00:00 2001 From: j Date: Thu, 30 Jan 2025 17:00:02 +0530 Subject: [PATCH] only set annotation if it exists --- static/js/editor.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/static/js/editor.js b/static/js/editor.js index a4b066d1..24f9e557 100644 --- a/static/js/editor.js +++ b/static/js/editor.js @@ -222,7 +222,9 @@ pandora.ui.editor = function(data) { }); } that.updateAnnotation(data.id, result.data); - pandora.UI.set('videoPoints.' + ui.item + '.annotation', result.data.id.split('/')[1] || ''); + if (result.data.id) { + pandora.UI.set('videoPoints.' + ui.item + '.annotation', result.data.id.split('/')[1] || ''); + } Ox.Request.clearCache(); }; var edit = {