fix a bug in id dialog

This commit is contained in:
rolux 2013-03-01 08:02:30 +05:30
parent cdeb38b7e8
commit e3f5110643

View file

@ -92,7 +92,7 @@ pandora.ui.idDialog = function(data) {
var checkboxes = []; var checkboxes = [];
$content = Ox.Element() $content = Ox.Element()
.css({padding: '13px', overflowY: 'auto'}); .css({padding: '13px', overflowY: 'auto'});
if (result.data.items) { if (result.data.items.length) {
['title', 'director', 'year'].forEach(function(key) { ['title', 'director', 'year'].forEach(function(key) {
$input.push( $input.push(
Ox.Input({ Ox.Input({
@ -138,7 +138,7 @@ pandora.ui.idDialog = function(data) {
? pandora.api.findId ? pandora.api.findId
: Ox.noop : Ox.noop
)({id: data.imdbId}, function(result_) { )({id: data.imdbId}, function(result_) {
if (result_ && result_.data.items) { if (result_ && result_.data.items.length) {
checkboxes.push( checkboxes.push(
{ {
id: data.imdbId, id: data.imdbId,