From 39d54948493ebd02f637dd9da239b72bb12fb3e7 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Mon, 1 Feb 2016 18:29:31 +0000 Subject: [PATCH] clipList: handle smart lists with no conditions (fixes #2884) I have a smart list which has no conditions (ie matches all items). This breaks "View as Clips" when the list is selected because: pandora.api.getList({id: "wjt:Everything"}) -> { // ... data: { // ... query: {} } } so result.data.query.conditions is undefined. --- static/js/clipList.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/clipList.js b/static/js/clipList.js index ba6d8af..1d35434 100644 --- a/static/js/clipList.js +++ b/static/js/clipList.js @@ -85,7 +85,7 @@ pandora.ui.clipList = function(videoRatio) { // add possible layer conditions from query if (ui._list) { pandora.api.getList({id: ui._list}, function(result) { - if (result.data.type == 'smart') { + if (result.data.type == 'smart' && result.data.query.conditions) { addConditions(query, result.data.query.conditions); query.operator = result.data.query.operator; } -- 2.5.0