forked from 0x2620/pandora
dont fail if layer does not exist
This commit is contained in:
parent
5f1d8425a1
commit
8bb7ae436f
1 changed files with 2 additions and 2 deletions
|
@ -2047,7 +2047,7 @@ pandora.getVideoOptions = function(data) {
|
||||||
options.annotations[i] = Ox.extend({}, layer, {
|
options.annotations[i] = Ox.extend({}, layer, {
|
||||||
title: Ox._(layer.title),
|
title: Ox._(layer.title),
|
||||||
item: Ox._(layer.item),
|
item: Ox._(layer.item),
|
||||||
items: data.layers[layer.id].map(function(annotation) {
|
items: data.layers[layer.id] ? data.layers[layer.id].map(function(annotation) {
|
||||||
annotation.duration = Math.abs(annotation.out - annotation['in']);
|
annotation.duration = Math.abs(annotation.out - annotation['in']);
|
||||||
annotation.editable = annotation.editable
|
annotation.editable = annotation.editable
|
||||||
|| annotation.user == pandora.user.username
|
|| annotation.user == pandora.user.username
|
||||||
|
@ -2058,7 +2058,7 @@ pandora.getVideoOptions = function(data) {
|
||||||
return Ox.getLanguageNameByCode(language);
|
return Ox.getLanguageNameByCode(language);
|
||||||
});
|
});
|
||||||
return annotation;
|
return annotation;
|
||||||
})
|
}) : []
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
data.videoRatio = data.videoRatio || pandora.site.video.previewRatio;
|
data.videoRatio = data.videoRatio || pandora.site.video.previewRatio;
|
||||||
|
|
Loading…
Reference in a new issue