Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export class ComposeErrModule extends ViewModule<ComposeView> {
// format footer the way it would be in outgoing plaintext
footer = Xss.htmlUnescape(Xss.htmlSanitizeAndStripAllTags(this.view.footerModule.createFooterHtml(footer), '\n')).trim();
}
if ((!plaintext.trim() || (footer && plaintext.trim() === footer.trim())) && !(await Ui.modal.confirm('Send empty message?'))) {
if ((!plaintext.trim() || plaintext.trim() === footer?.trim()) && !(await Ui.modal.confirm('Send empty message?'))) {
throw new ComposerResetBtnTrigger();
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export class ComposeQuoteModule extends ViewModule<ComposeView> {
});
if (decryptRes.success) {
return decryptRes.content.toUtfStr();
} else if (decryptRes.error && decryptRes.error.type === DecryptErrTypes.needPassphrase) {
} else if (decryptRes.error?.type === DecryptErrTypes.needPassphrase) {
if (Catch.isThunderbirdMail() && this.view.useFullScreenSecureCompose) {
await Time.sleep(2300);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export class ComposeStorageModule extends ViewModule<ComposeView> {
const kis = await KeyStore.get(this.view.acctEmail);
for (const ki of kis) {
const pp = await PassphraseStore.get(this.view.acctEmail, ki, true);
if (pp && pwd.toLowerCase() === pp.toLowerCase()) {
if (pwd.toLowerCase() === pp?.toLowerCase()) {
return true;
}
// check whether this pwd unlocks the ki
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export class ThunderbirdElementReplacer extends WebmailElementReplacer {
} else {
const decryptErr = result as DecryptError;
let decryptionErrorMsg = '';
if (decryptErr.error && decryptErr.error.type === DecryptErrTypes.needPassphrase) {
if (decryptErr.error?.type === DecryptErrTypes.needPassphrase) {
const acctEmail = String(await BrowserMsg.send.bg.await.thunderbirdGetCurrentUser());
const longids = decryptErr.longids.needPassphrase.join(',');
decryptionErrorMsg = `decrypt error: private key needs to be unlocked by your passphrase.`;
Expand Down
Loading
Loading