mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-11 08:24:50 +03:00
JavaScript inArray()/indexOf() to .includes()
This commit is contained in:
parent
ec3fd5b7e4
commit
db2d95d684
20 changed files with 69 additions and 86 deletions
|
|
@ -20,7 +20,6 @@ import {
|
|||
import { $htmlCL, leftPanelDisabled, keyScopeReal, useKeyboardShortcuts, moveAction } from 'Common/Globals';
|
||||
|
||||
import {
|
||||
inArray,
|
||||
isNonEmptyArray,
|
||||
trim,
|
||||
noop,
|
||||
|
|
@ -135,7 +134,7 @@ class MessageViewMailBoxUserView extends AbstractViewNext {
|
|||
);
|
||||
|
||||
this.downloadAsZipAllowed = ko.computed(
|
||||
() => -1 < inArray('zip', this.attachmentsActions()) && this.allowAttachmnetControls()
|
||||
() => this.attachmentsActions().includes('zip') && this.allowAttachmnetControls()
|
||||
);
|
||||
|
||||
this.downloadAsZipLoading = ko.observable(false);
|
||||
|
|
@ -156,7 +155,7 @@ class MessageViewMailBoxUserView extends AbstractViewNext {
|
|||
read: this.lastReplyAction_,
|
||||
write: (value) => {
|
||||
this.lastReplyAction_(
|
||||
-1 === inArray(value, [ComposeType.Reply, ComposeType.ReplyAll, ComposeType.Forward])
|
||||
[ComposeType.Reply, ComposeType.ReplyAll, ComposeType.Forward].includes(value)
|
||||
? ComposeType.Reply
|
||||
: value
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue