mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-02 14:07:04 +03:00
JavaScript string compare '' is always a ToBoolean
See https://www.ecma-international.org/ecma-262/5.1/#sec-9.2
This commit is contained in:
parent
82bed1ed80
commit
2ba34532c2
57 changed files with 213 additions and 218 deletions
|
|
@ -371,7 +371,7 @@ export function mailBox(folder, page = 1, search = '', threadUid = '') {
|
|||
|
||||
let result = HASH_PREFIX + 'mailbox/';
|
||||
|
||||
if ('' !== folder) {
|
||||
if (folder) {
|
||||
const resultThreadUid = pInt(threadUid);
|
||||
result += window.encodeURI(folder) + (0 < resultThreadUid ? '~' + resultThreadUid : '');
|
||||
}
|
||||
|
|
@ -381,7 +381,7 @@ export function mailBox(folder, page = 1, search = '', threadUid = '') {
|
|||
result += '/p' + page;
|
||||
}
|
||||
|
||||
if ('' !== search) {
|
||||
if (search) {
|
||||
result = result.replace(/[/]+$/, '');
|
||||
result += '/' + window.encodeURI(search);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue