check defined
This commit is contained in:
parent
72323febea
commit
8bab6a9c0c
1 changed files with 4 additions and 4 deletions
|
@ -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');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue