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); };