mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 21:19:21 +03:00
Array.isArray to isArray
Array.isNotEmpty to isNonEmptyArray
This commit is contained in:
parent
986b8f056b
commit
0b64083543
30 changed files with 82 additions and 69 deletions
3
dev/External/User/ko.js
vendored
3
dev/External/User/ko.js
vendored
|
|
@ -3,6 +3,7 @@ import ko from 'ko';
|
|||
import { HtmlEditor } from 'Common/Html';
|
||||
import { timeToNode } from 'Common/Momentor';
|
||||
import { elementById } from 'Common/Globals';
|
||||
import { isArray } from 'Common/Utils';
|
||||
import { EmailAddressesComponent } from 'Component/EmailAddresses';
|
||||
import { ThemeStore } from 'Stores/Theme';
|
||||
|
||||
|
|
@ -144,7 +145,7 @@ ko.bindingHandlers.dropmessages = {
|
|||
fnStop(e);
|
||||
if ('messages' === getDragAction(e) && ['move','copy'].includes(e.dataTransfer.effectAllowed)) {
|
||||
let data = dragData.data;
|
||||
if (folder && data && data.folder && Array.isArray(data.uids)) {
|
||||
if (folder && data && data.folder && isArray(data.uids)) {
|
||||
rl.app.moveMessagesToFolder(data.folder, data.uids, folder.fullNameRaw, data.copy && e.ctrlKey);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
3
dev/External/ko.js
vendored
3
dev/External/ko.js
vendored
|
|
@ -1,6 +1,7 @@
|
|||
import { i18n, i18nToNodes, trigger } from 'Common/Translator';
|
||||
import { doc, createElement } from 'Common/Globals';
|
||||
import { SaveSettingsStep } from 'Common/Enums';
|
||||
import { isNonEmptyArray } from 'Common/Utils';
|
||||
|
||||
const
|
||||
isFunction = v => typeof v === 'function',
|
||||
|
|
@ -146,7 +147,7 @@ ko.extenders.limitedList = (target, limitedList) => {
|
|||
const currentValue = ko.unwrap(target),
|
||||
list = ko.unwrap(limitedList);
|
||||
|
||||
if (Array.isNotEmpty(list)) {
|
||||
if (isNonEmptyArray(list)) {
|
||||
if (list.includes(newValue)) {
|
||||
target(newValue);
|
||||
} else if (list.includes(currentValue, list)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue