diff --git a/www/common/outer/support.js b/www/common/outer/support.js index 912fa5d23..20ee7200d 100644 --- a/www/common/outer/support.js +++ b/www/common/outer/support.js @@ -104,6 +104,7 @@ define([ msg = JSON.parse(msg); } catch (e) { console.error(e); + return; // Don't show "undefined" messages } msg.time = time; if (author) { msg.author = author; } @@ -232,6 +233,7 @@ define([ var anonRpc = Util.find(ctx, [ 'store', 'anon_rpc' ]); if (!mailbox) { return void cb('E_NOT_READY'); } if (!anonRpc) { return void cb("anonymous rpc session not ready"); } + if (!data?.ticket) { return void cb('E_NO_DATA'); } var theirPublic, myCurve, notifKey; var time; nThen((waitFor) => { diff --git a/www/support/ui.js b/www/support/ui.js index 45dc74a44..b9e377c26 100644 --- a/www/support/ui.js +++ b/www/support/ui.js @@ -162,6 +162,7 @@ define([ var makeForm = function (ctx, opts, cb) { let { oldData, recorded, title, hideNotice } = opts || {}; var button; + cb = Util.once(cb); if (typeof(cb) === "function") { button = h('button.btn.btn-primary.cp-support-list-send', Messages.contacts_send);