From 46108118213e8512afeaa8ecb895fe39158efd5e Mon Sep 17 00:00:00 2001 From: rolux Date: Tue, 21 Feb 2012 20:44:35 +0000 Subject: [PATCH] fix #581 (preview dialog title) --- static/js/pandora/list.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/static/js/pandora/list.js b/static/js/pandora/list.js index cc128dc6c..407a2ba14 100644 --- a/static/js/pandora/list.js +++ b/static/js/pandora/list.js @@ -422,7 +422,11 @@ pandora.ui.list = function() { } }, function(result) { var item = result.data.items[0], - title = item.title + ' (' + item.director.join(', ') + ') ' + item.year, + title = item.title + ( + item.director ? ' (' + item.director.join(', ') + ')' : '' + ) + ( + item.year ? ' ' + item.year : '' + ), ratio = item.posterRatio, windowWidth = window.innerWidth * 0.8, windowHeight = window.innerHeight * 0.8,