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.
This commit is contained in:
Will Thompson 2016-02-01 18:29:31 +00:00 committed by j
parent 8f1a0c3047
commit e47c652ad0

View file

@ -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;
}