mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Replaced _.has() with native Object.prototype.hasOwnProperty.call()
This commit is contained in:
parent
84ac7dc893
commit
756fe81091
3 changed files with 4 additions and 6 deletions
|
|
@ -6,7 +6,6 @@ import {
|
||||||
noop,
|
noop,
|
||||||
trim,
|
trim,
|
||||||
log,
|
log,
|
||||||
has,
|
|
||||||
isArray,
|
isArray,
|
||||||
isUnd,
|
isUnd,
|
||||||
isNormal,
|
isNormal,
|
||||||
|
|
@ -703,7 +702,7 @@ class AppUser extends AbstractApp {
|
||||||
|
|
||||||
if (data.Result.Flags) {
|
if (data.Result.Flags) {
|
||||||
for (uid in data.Result.Flags) {
|
for (uid in data.Result.Flags) {
|
||||||
if (has(data.Result.Flags, uid)) {
|
if (Object.prototype.hasOwnProperty.call(data.Result.Flags, uid)) {
|
||||||
check = true;
|
check = true;
|
||||||
const flags = data.Result.Flags[uid];
|
const flags = data.Result.Flags[uid];
|
||||||
storeMessageFlagsToCacheByFolderAndUid(folderFromCache.fullNameRaw, uid.toString(), [
|
storeMessageFlagsToCacheByFolderAndUid(folderFromCache.fullNameRaw, uid.toString(), [
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import _ from '_';
|
||||||
import $ from '$';
|
import $ from '$';
|
||||||
import ko from 'ko';
|
import ko from 'ko';
|
||||||
import { Notification, UploadErrorCode } from 'Common/Enums';
|
import { Notification, UploadErrorCode } from 'Common/Enums';
|
||||||
import { pInt, isUnd, isNull, has, microtime } from 'Common/Utils';
|
import { pInt, isUnd, isNull, microtime } from 'Common/Utils';
|
||||||
import { $html, $htmlCL } from 'Common/Globals';
|
import { $html, $htmlCL } from 'Common/Globals';
|
||||||
import { reload as momentorReload } from 'Common/Momentor';
|
import { reload as momentorReload } from 'Common/Momentor';
|
||||||
import { langLink } from 'Common/Links';
|
import { langLink } from 'Common/Links';
|
||||||
|
|
@ -100,7 +100,7 @@ export function i18n(key, valueList, defaulValue) {
|
||||||
|
|
||||||
if (!isUnd(valueList) && !isNull(valueList)) {
|
if (!isUnd(valueList) && !isNull(valueList)) {
|
||||||
for (valueName in valueList) {
|
for (valueName in valueList) {
|
||||||
if (has(valueList, valueName)) {
|
if (Object.prototype.hasOwnProperty.call(valueList, valueName)) {
|
||||||
result = result.replace('%' + valueName + '%', valueList[valueName]);
|
result = result.replace('%' + valueName + '%', valueList[valueName]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,12 +15,11 @@ const isObject = _.isObject;
|
||||||
const isFunc = _.isFunction;
|
const isFunc = _.isFunction;
|
||||||
const isUnd = _.isUndefined;
|
const isUnd = _.isUndefined;
|
||||||
const isNull = _.isNull;
|
const isNull = _.isNull;
|
||||||
const has = _.has;
|
|
||||||
const noop = () => {}; // eslint-disable-line no-empty-function
|
const noop = () => {}; // eslint-disable-line no-empty-function
|
||||||
const noopTrue = () => true;
|
const noopTrue = () => true;
|
||||||
const noopFalse = () => false;
|
const noopFalse = () => false;
|
||||||
|
|
||||||
export { trim, isArray, isObject, isFunc, isUnd, isNull, has, noop, noopTrue, noopFalse, jassl };
|
export { trim, isArray, isObject, isFunc, isUnd, isNull, noop, noopTrue, noopFalse, jassl };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Function} func
|
* @param {Function} func
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue