mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
refactor: fix errors reported by unicorn/prefer-logical-operator-over-ternary + enable linting
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user