From 74f3d190f2e37fb2bbfde2acddc3469898301e69 Mon Sep 17 00:00:00 2001 From: rolux Date: Tue, 6 Aug 2013 10:37:53 +0000 Subject: [PATCH] when deselecting annotation, set it to empty string, not undefined --- static/js/editor.js | 2 +- static/js/player.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/static/js/editor.js b/static/js/editor.js index e2566fe2..8987facd 100644 --- a/static/js/editor.js +++ b/static/js/editor.js @@ -260,7 +260,7 @@ pandora.ui.editor = function(data) { pandora.UI.set({videoResolution: data.resolution}); }, select: function(data) { - pandora.UI.set('videoPoints.' + ui.item + '.annotation', data.id.split('/')[1]); + pandora.UI.set('videoPoints.' + ui.item + '.annotation', data.id.split('/')[1] || ''); }, subtitles: function(data) { pandora.UI.set({videoSubtitles: data.subtitles}); diff --git a/static/js/player.js b/static/js/player.js index 09abe245..4231a07b 100644 --- a/static/js/player.js +++ b/static/js/player.js @@ -137,7 +137,7 @@ pandora.ui.player = function(data) { pandora.UI.set({videoScale: data.scale}); }, select: function(data) { - pandora.UI.set('videoPoints.' + ui.item + '.annotation', data.id.split('/')[1]); + pandora.UI.set('videoPoints.' + ui.item + '.annotation', data.id.split('/')[1] || ''); }, subtitles: function(data) { pandora.UI.set({videoSubtitles: data.subtitles});