Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/auto-launch.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ async function disable () {
}

module.exports = async function () {
const activate = async ({ newValue, oldValue, feedback }) => {
const activate = async ({ newValue, oldValue = null, feedback = null }) => {
if (process.env.NODE_ENV === 'development') {
logger.info('[launch on startup] unavailable during development')

Expand Down Expand Up @@ -92,7 +92,7 @@ module.exports = async function () {

return true
} catch (err) {
logger.error(`[launch on startup] ${err.toString()}`)
logger.error(`[launch on startup] ${String(err)}`)

if (feedback) {
recoverableErrorDialog(err, {
Expand Down
4 changes: 2 additions & 2 deletions src/automatic-gc.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function applyConfig (newFlags) {
}

module.exports = async function () {
const activate = ({ newValue, oldValue }) => {
const activate = ({ newValue, oldValue = null }) => {
if (newValue === oldValue) return

try {
Expand All @@ -47,7 +47,7 @@ module.exports = async function () {

return true
} catch (err) {
logger.error(`[automatic gc] ${err.toString()}`)
logger.error(`[automatic gc] ${String(err)}`)

return false
}
Expand Down
2 changes: 1 addition & 1 deletion src/utils/setup-global-shortcut.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const ipcMainEvents = require('../common/ipc-main-events')
// This function registers a global shortcut/accelerator with a certain action
// and (de)activates it according to its 'settingsOption' value on settings.
module.exports = function ({ settingsOption, accelerator, action, confirmationDialog }) {
const activate = ({ newValue, oldValue, feedback }) => {
const activate = ({ newValue, oldValue = null, feedback = null }) => {
if (newValue === oldValue) return

if (newValue === true) {
Expand Down