From e47c652ad0dab503132ed4c1c68c583004a2c25c 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 ba6d8af10..1d3543406 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; }