mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +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
|
|
@ -1,5 +1,5 @@
|
|||
import window from 'window';
|
||||
import { isUnd, isNormal, isArray, inArray } from 'Common/Utils';
|
||||
import { isUnd, isNormal, isArray } from 'Common/Utils';
|
||||
|
||||
let SETTINGS = window.__rlah_data() || null;
|
||||
SETTINGS = isNormal(SETTINGS) ? SETTINGS : {};
|
||||
|
|
@ -37,5 +37,5 @@ export function appSettingsGet(name) {
|
|||
*/
|
||||
export function capa(name) {
|
||||
const values = settingsGet('Capa');
|
||||
return isArray(values) && isNormal(name) && -1 < inArray(name, values);
|
||||
return isArray(values) && isNormal(name) && values.includes(name);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue