Lint fixes

This commit is contained in:
Knut Sveidqvist
2020-08-17 08:45:20 +02:00
parent 12272dfb80
commit aafb65f888

View File

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