mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 03:29:20 +03:00
Reduce JavaScript footprint
This commit is contained in:
parent
689126c57d
commit
b12852bd08
42 changed files with 240 additions and 426 deletions
|
|
@ -5,7 +5,7 @@ import { getNotification } from 'Common/Translator';
|
|||
|
||||
let iJsonErrorCount = 0;
|
||||
|
||||
const getURL = (add = '') => serverRequest('Json') + add,
|
||||
const getURL = (add = '') => serverRequest('Json') + pString(add),
|
||||
|
||||
checkResponseError = data => {
|
||||
const err = data ? data.ErrorCode : null;
|
||||
|
|
@ -109,10 +109,8 @@ export class AbstractFetchRemote
|
|||
buffer = buffer.slice(result.index + 1);
|
||||
re.lastIndex = 0;
|
||||
}
|
||||
if (buffer.length) {
|
||||
// last line didn't end in a newline char
|
||||
fCallback(buffer);
|
||||
}
|
||||
// last line didn't end in a newline char
|
||||
buffer.length && fCallback(buffer);
|
||||
};
|
||||
reader.read().then(processText);
|
||||
})
|
||||
|
|
@ -132,7 +130,7 @@ export class AbstractFetchRemote
|
|||
|
||||
abortActions && console.error('abortActions is obsolete');
|
||||
|
||||
fetchJSON(sAction, pString(sGetAdd),
|
||||
fetchJSON(sAction, sGetAdd,
|
||||
params,
|
||||
undefined === iTimeout ? 30000 : pInt(iTimeout),
|
||||
data => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue