From aafb65f888b0c8ab4c63bd8713dd655aa4e7012d Mon Sep 17 00:00:00 2001 From: Knut Sveidqvist Date: Mon, 17 Aug 2020 08:45:20 +0200 Subject: [PATCH] Lint fixes --- src/config.js | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/config.js b/src/config.js index 062a6612c..c3ab058fd 100644 --- a/src/config.js +++ b/src/config.js @@ -18,7 +18,6 @@ export const updateCurrentConfig = (siteCfg, _directives) => { // let sCfg = assignWithDepth(defaultConfig, siteConfigDelta); // Join directives - let themeVariables = {}; let sumOfDirectives = {}; for (let i = 0; i < _directives.length; i++) { const d = _directives[i]; @@ -73,25 +72,7 @@ export const setSiteConfig = conf => { currentConfig = updateCurrentConfig(siteConfig, directives); return siteConfig; }; -const deepCopyFunction = inObject => { - let outObject, value, key; - if (typeof inObject !== 'object' || inObject === null) { - return inObject; // Return the value if inObject is not an object - } - - // Create an array or object to hold the values - outObject = Array.isArray(inObject) ? [] : {}; - - for (key in inObject) { - value = inObject[key]; - - // Recursively (deep) copy for nested objects, including arrays - outObject[key] = deepCopyFunction(value); - } - - return outObject; -}; export const setSiteConfigDelta = conf => { siteConfigDelta = assignWithDepth({}, conf); };