Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
knennigtri committed Oct 2, 2023
1 parent 7061762 commit 43e91ef
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions importObjectUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ async function updateSettings(importObj, newSettingsFile) {

// Replaces a settings key/value pair in the objName if present in the importData
function replaceSettings(importData, tagComponentName, objName, newSettings) {
let componentArr = importData[tagComponentName]
let componentArr = importData[tagComponentName];
if (componentArr) {
for (const key of componentArr) {
const keyName = key.attributes.name;
Expand All @@ -68,7 +68,7 @@ function replaceSettings(importData, tagComponentName, objName, newSettings) {
for (const setting in newSettings) {
settings = parserUtil.replaceValueInJSON(settings, setting, newSettings[setting]);
}
debugNewSettings("Applying to settings JSON:")
debugNewSettings("Applying to settings JSON:");
debugNewSettings(settings);
key.attributes.settings = JSON.stringify(settings);
return importData;
Expand Down
12 changes: 6 additions & 6 deletions parserUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ function replaceValueInJSON(jsonObject, keyToFind, newValue) {
} else {
for (const key in jsonObject) {
debugReplace("replace: " + key);
if (key === keyToFind) {
debugReplace("Found key '" + keyToFind + "' with value '" + jsonObject[key] + "' and replacing with '" + newValue + "'");
jsonObject[key] = newValue;
} else {
jsonObject[key] = replaceValueInJSON(jsonObject[key], keyToFind, newValue);
}
if (key === keyToFind) {
debugReplace("Found key '" + keyToFind + "' with value '" + jsonObject[key] + "' and replacing with '" + newValue + "'");
jsonObject[key] = newValue;
} else {
jsonObject[key] = replaceValueInJSON(jsonObject[key], keyToFind, newValue);
}
}
}
return jsonObject;
Expand Down

0 comments on commit 43e91ef

Please sign in to comment.