refactor: fix errors reported by unicorn/prefer-logical-operator-over-ternary + enable linting

This commit is contained in:
Milan Burda
2023-06-26 20:38:59 +02:00
parent 2e0517c0ad
commit 1992f374e1
2 changed files with 2 additions and 2 deletions

View File

@@ -31,7 +31,7 @@ process.on('uncaughtException', function (error) {
// so we import it inside the handler down here
import('electron')
.then(({ dialog }) => {
const stack = error.stack ? error.stack : `${error.name}: ${error.message}`;
const stack = error.stack || `${error.name}: ${error.message}`;
const message = 'Uncaught Exception:\n' + stack;
dialog.showErrorBox('A JavaScript error occurred in the main process', message);
});

View File

@@ -197,7 +197,7 @@ async function prepareRelease (isBeta, notesOnly) {
const newVersion = await getNewVersion(true);
console.log(newVersion);
} else {
const currentBranch = (args.branch) ? args.branch : await getCurrentBranch(ELECTRON_DIR);
const currentBranch = args.branch || await getCurrentBranch(ELECTRON_DIR);
if (notesOnly) {
const newVersion = await getNewVersion(true);
const releaseNotes = await getReleaseNotes(currentBranch, newVersion);