forked from cory/tildefriends
Adding multiplayer markdeep.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3291 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@ -83,17 +83,14 @@ function notifyChanged() {
|
||||
return core.broadcast({changed: true});
|
||||
}
|
||||
|
||||
function readList(key) {
|
||||
return database.get(key).catch(function(error) {
|
||||
return null;
|
||||
}).then(function(todo) {
|
||||
try {
|
||||
todo = JSON.parse(todo);
|
||||
} catch (error) {
|
||||
todo = {name: "TODO", items: []};
|
||||
}
|
||||
return todo;
|
||||
});
|
||||
async function readList(key) {
|
||||
let todo = null;
|
||||
try {
|
||||
todo = JSON.parse(await database.get(key));
|
||||
} catch (error) {
|
||||
todo = {name: "TODO", items: []};
|
||||
}
|
||||
return todo;
|
||||
}
|
||||
|
||||
function writeList(key, todo) {
|
||||
|
Reference in New Issue
Block a user