mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 12:39: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
|
|
@ -1,5 +1,5 @@
|
|||
import { ajax } from 'Common/Links';
|
||||
import { isNormal, pString } from 'Common/Utils';
|
||||
import { pInt, pString } from 'Common/Utils';
|
||||
import { DEFAULT_AJAX_TIMEOUT, TOKEN_ERROR_LIMIT, AJAX_ERROR_LIMIT } from 'Common/Consts';
|
||||
import { Notification } from 'Common/Enums';
|
||||
import { data as GlobalsData } from 'Common/Globals';
|
||||
|
|
@ -75,7 +75,7 @@ class AbstractAjaxPromises extends AbstractBasicPromises {
|
|||
if (window.AbortController) {
|
||||
this.abort(action);
|
||||
const controller = new AbortController();
|
||||
setTimeout(() => controller.abort(), isNormal(timeOut) ? timeOut : DEFAULT_AJAX_TIMEOUT);
|
||||
setTimeout(() => controller.abort(), pInt(timeOut, DEFAULT_AJAX_TIMEOUT));
|
||||
init.signal = controller.signal;
|
||||
this.oRequests[action] = controller;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { UNUSED_OPTION_VALUE } from 'Common/Consts';
|
||||
import { isNormal, pInt } from 'Common/Utils';
|
||||
import { pInt } from 'Common/Utils';
|
||||
import { ClientSideKeyName, ServerFolderType } from 'Common/Enums';
|
||||
import * as Cache from 'Common/Cache';
|
||||
|
||||
|
|
@ -71,11 +71,11 @@ class PromisesUserPopulator extends AbstractBasicPromises {
|
|||
Cache.setFolderHash(oCacheFolder.fullNameRaw, oFolder.Extended.Hash);
|
||||
}
|
||||
|
||||
if (isNormal(oFolder.Extended.MessageCount)) {
|
||||
if (null != oFolder.Extended.MessageCount) {
|
||||
oCacheFolder.messageCountAll(oFolder.Extended.MessageCount);
|
||||
}
|
||||
|
||||
if (isNormal(oFolder.Extended.MessageUnseenCount)) {
|
||||
if (null != oFolder.Extended.MessageUnseenCount) {
|
||||
oCacheFolder.messageCountUnread(oFolder.Extended.MessageUnseenCount);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue