Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jun 5, 2024
1 parent 518dd96 commit aaaeef7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/electron/frontend/core/components/Dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ export class Dashboard extends LitElement {
if (value) elements.forEach((el) => el.removeAttribute("hidden"));
else elements.forEach((el) => el.setAttribute("hidden", true));
}
})
});

// Ensure that all states are synced to the proper state for this page (e.g. conversions have been run)
this.page
Expand Down
4 changes: 1 addition & 3 deletions src/electron/frontend/core/progress/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export const rename = (newDatasetName, previousDatasetName) => {
localStorage.setItem(newProgressFilePath, localStorage.getItem(oldProgressFilePath));
localStorage.removeItem(oldProgressFilePath);
}

} else throw new Error("No previous project name provided");
};

Expand Down Expand Up @@ -56,13 +55,12 @@ export const updateFile = (projectName, callback) => {

data["last-modified"] = new Date(); // Always update the last modified time

const projectFileName = projectName + ".json"
const projectFileName = projectName + ".json";
const guidedFilePath = joinPath(guidedProgressFilePath, projectFileName);

// Save the file through the available mechanisms
if (fs) {
if (!fs.existsSync(guidedProgressFilePath)) fs.mkdirSync(guidedProgressFilePath, { recursive: true }); //create progress folder if one does not exist
fs.writeFileSync(guidedFilePath, JSON.stringify(data, null, 2));
} else localStorage.setItem(guidedFilePath, JSON.stringify(data));

};

0 comments on commit aaaeef7

Please sign in to comment.