guard against a typeError when drive-less users try to send a pad-burned notification

This commit is contained in:
ansuz 2021-07-26 15:02:48 +05:30
parent 7bc6ed17b9
commit e5558b516c
1 changed files with 8 additions and 1 deletions

View File

@ -2058,8 +2058,15 @@ define([
} catch (e) {
console.error(e);
}
// Tell all the owners that the pad was deleted from the server
var curvePublic = store.proxy.curvePublic;
var curvePublic;
try {
curvePublic = store.proxy.curvePublic;
} catch (err) {
console.error(err);
return; // XXX anons can't send notifications...
}
m.forEach(function (obj) {
var mb = JSON.parse(obj);
if (mb.curvePublic === curvePublic) { return; }