Fix INVALID_RESPONSE error in the file app
This commit is contained in:
parent
54a91f1153
commit
037a6ccc35
4 changed files with 12 additions and 9 deletions
2
rpc.js
2
rpc.js
|
@ -1181,7 +1181,7 @@ RPC.create = function (
|
|||
});
|
||||
case 'IS_NEW_CHANNEL':
|
||||
return void isNewChannel(Env, msg[1], function (e, isNew) {
|
||||
respond(null, [null, isNew, null]);
|
||||
respond(e, [null, isNew, null]);
|
||||
});
|
||||
default:
|
||||
console.error("unsupported!");
|
||||
|
|
|
@ -102,7 +102,7 @@ types of messages:
|
|||
}
|
||||
|
||||
// HACK to hide messages from the anon rpc
|
||||
if (parsed.length !== 4) {
|
||||
if (parsed.length !== 4 && parsed[1] !== 'ERROR') {
|
||||
console.log(parsed);
|
||||
console.error("received message [%s] for txid[%s] with no callback", msg, txid);
|
||||
}
|
||||
|
|
|
@ -132,10 +132,12 @@ define([
|
|||
// Check if the pad exists on server
|
||||
if (!window.location.hash) { isNewFile = true; return; }
|
||||
|
||||
Cryptpad.isNewChannel(window.location.href, waitFor(function (e, isNew) {
|
||||
if (e) { return console.error(e); }
|
||||
isNewFile = Boolean(isNew);
|
||||
}));
|
||||
if (realtime) {
|
||||
Cryptpad.isNewChannel(window.location.href, waitFor(function (e, isNew) {
|
||||
if (e) { return console.error(e); }
|
||||
isNewFile = Boolean(isNew);
|
||||
}));
|
||||
}
|
||||
}).nThen(function () {
|
||||
var readOnly = secret.keys && !secret.keys.editKeyStr;
|
||||
var isNewHash = true;
|
||||
|
|
|
@ -51,7 +51,7 @@ define([
|
|||
|
||||
Sortable.create($list[0], {
|
||||
store: {
|
||||
get: function (sortable) {
|
||||
get: function () {
|
||||
return todo.getOrder();
|
||||
},
|
||||
set: function (sortable) {
|
||||
|
@ -135,6 +135,8 @@ define([
|
|||
$taskDiv.addClass('cp-app-todo-task-complete');
|
||||
}
|
||||
|
||||
var $span = $('<span>', { 'class': 'cp-app-todo-task-text' });
|
||||
|
||||
var $input = $('<input>', {
|
||||
type: 'text',
|
||||
'class': 'cp-app-todo-task-input'
|
||||
|
@ -147,8 +149,7 @@ define([
|
|||
}
|
||||
}).appendTo($taskDiv);
|
||||
|
||||
var $span = $('<span>', { 'class': 'cp-app-todo-task-text' })
|
||||
.text(entry.task)
|
||||
$span.text(entry.task)
|
||||
.appendTo($taskDiv)
|
||||
.click(function () {
|
||||
$input.show();
|
||||
|
|
Loading…
Reference in a new issue