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