minor refactoring

This commit is contained in:
rolux 2012-04-19 08:53:22 +00:00
parent a30ddb7c32
commit 82e75fa10c

View file

@ -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) {