forked from cory/tildefriends
Experimenting with storing drafts. Fixed an old scary tfrpc bug which resulted in localStorageGet returning wrong values on subsequent calls.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4138 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
14
core/app.js
14
core/app.js
@ -22,14 +22,14 @@ App.prototype.readOutput = function(callback) {
|
||||
|
||||
App.prototype.makeFunction = function(api) {
|
||||
let self = this;
|
||||
let id = g_next_id++;
|
||||
while (!id || g_calls[id]) {
|
||||
id = g_next_id++;
|
||||
}
|
||||
let promise = new Promise(function(resolve, reject) {
|
||||
g_calls[id] = {resolve: resolve, reject: reject};
|
||||
});
|
||||
let result = function() {
|
||||
let id = g_next_id++;
|
||||
while (!id || g_calls[id]) {
|
||||
id = g_next_id++;
|
||||
}
|
||||
let promise = new Promise(function(resolve, reject) {
|
||||
g_calls[id] = {resolve: resolve, reject: reject};
|
||||
});
|
||||
let message = {
|
||||
message: 'tfrpc',
|
||||
method: api[0],
|
||||
|
Reference in New Issue
Block a user