mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 19:49:20 +03:00
Removed isNormal() because 'null == undefined' so 'null != value' is sufficient
This commit is contained in:
parent
1b811428e7
commit
f6a55898c7
13 changed files with 50 additions and 68 deletions
|
|
@ -12,7 +12,6 @@ import {
|
|||
} from 'Common/Enums';
|
||||
|
||||
import {
|
||||
isNormal,
|
||||
delegateRun,
|
||||
isNonEmptyArray,
|
||||
clearBqSwitcher,
|
||||
|
|
@ -387,7 +386,7 @@ class ComposePopupView extends AbstractViewNext {
|
|||
if (
|
||||
Array.isArray(this.aDraftInfo) &&
|
||||
3 === this.aDraftInfo.length &&
|
||||
isNormal(this.aDraftInfo[2]) &&
|
||||
null != this.aDraftInfo[2] &&
|
||||
this.aDraftInfo[2].length
|
||||
) {
|
||||
sSentFolder = this.aDraftInfo[2];
|
||||
|
|
@ -795,7 +794,7 @@ class ComposePopupView extends AbstractViewNext {
|
|||
this.addEmailsTo(this.cc, aCcEmails);
|
||||
this.addEmailsTo(this.bcc, aBccEmails);
|
||||
|
||||
if (isNormal(sCustomSubject) && sCustomSubject && !this.subject()) {
|
||||
if (sCustomSubject && !this.subject()) {
|
||||
this.subject(sCustomSubject);
|
||||
}
|
||||
}
|
||||
|
|
@ -863,7 +862,7 @@ class ComposePopupView extends AbstractViewNext {
|
|||
lineComposeType = sType || ComposeType.Empty;
|
||||
|
||||
oMessageOrArray = oMessageOrArray || null;
|
||||
if (oMessageOrArray && isNormal(oMessageOrArray)) {
|
||||
if (oMessageOrArray) {
|
||||
message =
|
||||
Array.isArray(oMessageOrArray) && 1 === oMessageOrArray.length
|
||||
? oMessageOrArray[0]
|
||||
|
|
@ -1050,9 +1049,9 @@ class ComposePopupView extends AbstractViewNext {
|
|||
this.setFocusInPopup();
|
||||
});
|
||||
} else if (ComposeType.Empty === lineComposeType) {
|
||||
this.subject(isNormal(sCustomSubject) ? '' + sCustomSubject : '');
|
||||
this.subject(null != sCustomSubject ? '' + sCustomSubject : '');
|
||||
|
||||
sText = isNormal(sCustomPlainText) ? '' + sCustomPlainText : '';
|
||||
sText = null != sCustomPlainText ? '' + sCustomPlainText : '';
|
||||
|
||||
this.editor((editor) => {
|
||||
editor.setHtml(sText, false);
|
||||
|
|
@ -1291,7 +1290,7 @@ class ComposePopupView extends AbstractViewNext {
|
|||
this.dragAndDropOver(false);
|
||||
|
||||
const fileName = undefined === oData.FileName ? '' : oData.FileName.toString(),
|
||||
size = isNormal(oData.Size) ? pInt(oData.Size) : null,
|
||||
size = pInt(oData.Size, null),
|
||||
attachment = new ComposeAttachmentModel(sId, fileName, size);
|
||||
|
||||
attachment.cancel = this.cancelAttachmentHelper(sId, oJua);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import { StorageResultType, Notification } from 'Common/Enums';
|
||||
import { isNormal } from 'Common/Utils';
|
||||
import { getNotification } from 'Common/Translator';
|
||||
import { HtmlEditor } from 'Common/HtmlEditor';
|
||||
|
||||
|
|
@ -142,7 +141,7 @@ class TemplatePopupView extends AbstractViewNext {
|
|||
data &&
|
||||
data.Result &&
|
||||
'Object/Template' === data.Result['@Object'] &&
|
||||
isNormal(data.Result.Body)
|
||||
null != data.Result.Body
|
||||
) {
|
||||
template.body = data.Result.Body;
|
||||
template.populated = true;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import { isNormal, windowResize } from 'Common/Utils';
|
||||
import { windowResize } from 'Common/Utils';
|
||||
import { Capa, Focused, Layout, KeyState, EventKeyCode } from 'Common/Enums';
|
||||
import { $htmlCL, leftPanelDisabled, moveAction } from 'Common/Globals';
|
||||
import { mailBox, settings } from 'Common/Links';
|
||||
|
|
@ -243,7 +243,7 @@ class FolderListMailBoxUserView extends AbstractViewNext {
|
|||
copy = $htmlCL.contains('rl-ctrl-key-pressed'),
|
||||
uids = ui.helper.data('rl-uids');
|
||||
|
||||
if (fromFolderFullNameRaw && isNormal(fromFolderFullNameRaw) && Array.isArray(uids)) {
|
||||
if (fromFolderFullNameRaw && Array.isArray(uids)) {
|
||||
getApp().moveMessagesToFolder(fromFolderFullNameRaw, uids, toFolder.fullNameRaw, copy);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue