From 5c2b58e70316bc3c816cd932d05e68f9fbf4e57f Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 28 Aug 2017 11:47:01 +0200 Subject: [PATCH] log error synchronously so we get a trace when pinPads has no callback --- www/common/cryptpad-common.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/www/common/cryptpad-common.js b/www/common/cryptpad-common.js index 46f364661..4df166682 100644 --- a/www/common/cryptpad-common.js +++ b/www/common/cryptpad-common.js @@ -811,6 +811,9 @@ define([ common.pinPads = function (pads, cb) { if (!pinsReady()) { return void cb ('RPC_NOT_READY'); } + if (typeof(cb) !== 'function') { + console.error('expected a callback'); + } rpc.pin(pads, function (e, hash) { if (e) { return void cb(e); }