From 5958b9f40864af1760181160d83458fbda553f49 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 15 Apr 2015 10:10:46 +0100 Subject: [PATCH] dont fail if annotation folder does not have focus --- source/UI/js/Video/AnnotationPanel.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/UI/js/Video/AnnotationPanel.js b/source/UI/js/Video/AnnotationPanel.js index f7ff0116..7f3d8fd1 100644 --- a/source/UI/js/Video/AnnotationPanel.js +++ b/source/UI/js/Video/AnnotationPanel.js @@ -504,9 +504,10 @@ Ox.AnnotationPanel = function(options, self) { } }, hide: function() { - self.options.selected - ? getFolder(self.options.selected).gainFocus() - : that.triggerEvent('focus'); + var folder = self.options.selected + ? getFolder(self.options.selected) + : null; + folder ? folder.gainFocus() : that.triggerEvent('focus'); } }) .appendTo(self.$menubar);