From 6d59519c64fa8dfdf80664eda3d7ad180de55ffb Mon Sep 17 00:00:00 2001 From: j Date: Sat, 25 Feb 2017 16:58:32 +0100 Subject: [PATCH] place could be null --- source/UI/js/Video/AnnotationFolder.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/UI/js/Video/AnnotationFolder.js b/source/UI/js/Video/AnnotationFolder.js index dc873c1c..9123262d 100644 --- a/source/UI/js/Video/AnnotationFolder.js +++ b/source/UI/js/Video/AnnotationFolder.js @@ -231,14 +231,15 @@ Ox.AnnotationFolder = function(options, self) { // FIXME: duplicated! select: function(data) { if ( - !data.id && self.options.selected + (!data || !data.id) && self.options.selected && isDefined(Ox.getObjectById(self.options.items, self.options.selected)) ) { // only deselect annotation if the place deselect was not // caused by switching to an annotation without place self.$annotations.options({selected: ''}); } else if ( - data.annotationIds + data + && data.annotationIds && data.annotationIds.indexOf(self.options.selected) == -1 ) { // only select a new annotation if the currently selected