diff --git a/dev/App/User.js b/dev/App/User.js index f48a2dd6c..845ee6240 100644 --- a/dev/App/User.js +++ b/dev/App/User.js @@ -6,7 +6,6 @@ import { noop, trim, log, - has, isArray, isUnd, isNormal, @@ -703,7 +702,7 @@ class AppUser extends AbstractApp { if (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; const flags = data.Result.Flags[uid]; storeMessageFlagsToCacheByFolderAndUid(folderFromCache.fullNameRaw, uid.toString(), [ diff --git a/dev/Common/Translator.js b/dev/Common/Translator.js index 8dfc67bd6..af18c2238 100644 --- a/dev/Common/Translator.js +++ b/dev/Common/Translator.js @@ -3,7 +3,7 @@ import _ from '_'; import $ from '$'; import ko from 'ko'; 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 { reload as momentorReload } from 'Common/Momentor'; import { langLink } from 'Common/Links'; @@ -100,7 +100,7 @@ export function i18n(key, valueList, defaulValue) { if (!isUnd(valueList) && !isNull(valueList)) { for (valueName in valueList) { - if (has(valueList, valueName)) { + if (Object.prototype.hasOwnProperty.call(valueList, valueName)) { result = result.replace('%' + valueName + '%', valueList[valueName]); } } diff --git a/dev/Common/Utils.js b/dev/Common/Utils.js index 10541c501..936f770be 100644 --- a/dev/Common/Utils.js +++ b/dev/Common/Utils.js @@ -15,12 +15,11 @@ const isObject = _.isObject; const isFunc = _.isFunction; const isUnd = _.isUndefined; const isNull = _.isNull; -const has = _.has; const noop = () => {}; // eslint-disable-line no-empty-function const noopTrue = () => true; 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