mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-18 14:59:53 +02:00
Lint fixes
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
Reference in New Issue
Block a user