From d3f134a0e82e20e89d46fc4d9990e350ebbb45e0 Mon Sep 17 00:00:00 2001 From: Pawel Korczak Date: Tue, 17 Oct 2023 08:13:41 +0200 Subject: [PATCH] feature: remove lodash --- views/js/provider/group.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/views/js/provider/group.js b/views/js/provider/group.js index 497a2ea..f7f72b2 100644 --- a/views/js/provider/group.js +++ b/views/js/provider/group.js @@ -18,7 +18,7 @@ * @author Alexander Zagovorichev */ -define(['jquery', 'lodash', 'i18n', 'util/url', 'core/promise', 'core/request'], function ($, _, __, urlUtil, Promise, coreRequest) { +define(['jquery', 'i18n', 'util/url', 'core/promise', 'core/request'], function ($, __, urlUtil, Promise, coreRequest) { 'use strict'; /** @@ -52,7 +52,7 @@ define(['jquery', 'lodash', 'i18n', 'util/url', 'core/promise', 'core/request'], type: 'instance' }; - config = _.defaults(config || {}, _defaults); + config = Object.assign({}, _defaults, config); return new Promise((resolve, reject) => { coreRequest({ @@ -80,7 +80,7 @@ define(['jquery', 'lodash', 'i18n', 'util/url', 'core/promise', 'core/request'], return new Promise((resolve, reject) => { - if (!_.isString(uri) || _.isEmpty(uri)) { + if (typeof uri !== 'string' || uri.trim() === '') { return reject(new TypeError(__('Group uri is not valid'))); }