Skip to content

Commit

Permalink
Return early if there are no args
Browse files Browse the repository at this point in the history
  • Loading branch information
nukeop committed Feb 18, 2018
1 parent f9c7511 commit cc40839
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ function createWindow() {
});
} else {
ipcMain.on('songChange', (event, arg) => {
if (arg === null) {
return;
}
changeWindowTitle(arg.artist, arg.name);
});
}
Expand Down
3 changes: 3 additions & 0 deletions main.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ function createWindow() {
});
} else {
ipcMain.on('songChange', (event, arg) => {
if (arg === null) {
return;
}
changeWindowTitle(arg.artist, arg.name);
});
}
Expand Down

0 comments on commit cc40839

Please sign in to comment.