minor refactoring
This commit is contained in:
parent
a30ddb7c32
commit
82e75fa10c
1 changed files with 1 additions and 4 deletions
|
@ -22,6 +22,7 @@ pandora.addList = function() {
|
||||||
data.query = pandora.user.ui.find;
|
data.query = pandora.user.ui.find;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
addList();
|
||||||
} else {
|
} else {
|
||||||
list = arguments[0];
|
list = arguments[0];
|
||||||
listData = pandora.getListData();
|
listData = pandora.getListData();
|
||||||
|
@ -33,8 +34,6 @@ pandora.addList = function() {
|
||||||
if (data.type == 'smart') {
|
if (data.type == 'smart') {
|
||||||
data.query = listData.query;
|
data.query = listData.query;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (isDuplicate) {
|
|
||||||
pandora.api.findLists({
|
pandora.api.findLists({
|
||||||
query: {conditions: [{key: 'id', value: list, operator: '=='}]},
|
query: {conditions: [{key: 'id', value: list, operator: '=='}]},
|
||||||
keys: ['description']
|
keys: ['description']
|
||||||
|
@ -68,8 +67,6 @@ pandora.addList = function() {
|
||||||
addList()
|
addList()
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
addList();
|
|
||||||
}
|
}
|
||||||
function addList(items) {
|
function addList(items) {
|
||||||
pandora.api.addList(data, function(result) {
|
pandora.api.addList(data, function(result) {
|
||||||
|
|
Loading…
Reference in a new issue