diff --git a/source/Ox.UI/js/Video/Ox.AnnotationFolder.js b/source/Ox.UI/js/Video/Ox.AnnotationFolder.js index 179ea0a9..b94c3b5c 100644 --- a/source/Ox.UI/js/Video/Ox.AnnotationFolder.js +++ b/source/Ox.UI/js/Video/Ox.AnnotationFolder.js @@ -335,7 +335,7 @@ Ox.AnnotationFolder = function(options, self) { function getEvents() { var events = []; self.annotations.filter(function(item) { - return !!item.event; + return !!(item.event && item.event.defined); }).forEach(function(item) { var index = Ox.getIndexById(events, item.event.id); if (index == -1) { @@ -352,7 +352,7 @@ Ox.AnnotationFolder = function(options, self) { function getPlaces() { var places = []; self.annotations.filter(function(item) { - return !!item.place; + return !!(item.place && item.place.defined); }).forEach(function(item) { var index = Ox.getIndexById(places, item.place.id); if (index == -1) { @@ -423,9 +423,9 @@ Ox.AnnotationFolder = function(options, self) { // which is an EditableElement without .data('id') if ( $element.data('id') - && !Ox.getObjectById( + && !(Ox.getObjectById( self.options.items, $element.data('id') - )[self.options.type] + )[self.options.type] || {}).defined ) { $element.addClass('OxWarning'); }