selected item might be gone

This commit is contained in:
j 2016-03-16 08:28:12 +01:00
parent cb875c86df
commit da08120ff4

View file

@ -332,9 +332,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);