diff --git a/js/app.js b/js/app.js
index c105c6b..388f4a3 100644
--- a/js/app.js
+++ b/js/app.js
@@ -87,10 +87,10 @@ function addItemToListClicked(list_ID, txt) {
}
function addNewListClicked(newListName) {
- db.lists.add({name: newListName}).then(function(list) {
- $('li#add_list_last_elem').before('
' + newListName + '');
- $('a#list_' + list.id).data('listID', list.id);
- $('a#list_' + list.id).click(function () { openList($(this)); });
+ db.lists.add({name: newListName}).then(function(listID) {
+ $('li#add_list_last_elem').before('' + newListName + '');
+ $('a#list_' + listID).data('listID', listID);
+ $('a#list_' + listID).click(function () { openList($(this)); });
$.afui.goBack();
});
}