Make number check for windows bagde future-proof

This commit is contained in:
Magnus Hauge Bakke 2016-04-06 13:14:39 +02:00
parent 7aad726269
commit 2d6df2fffd
1 changed files with 3 additions and 3 deletions

View File

@ -195,11 +195,11 @@
app.dock.setBadge(String(arg));
}
else if (process.platform === "win32") {
// If we get a . it means there's unread messages. We don't care about that
if (arg === '.' || arg === '•') {
let n = parseInt(arg, 10);
// Only show notifications with number
if (isNaN(n)) {
return;
}
let n = parseInt(arg, 10);
if (n > 0) {
mainWindow.setOverlayIcon(__dirname + '/assets/img/favicon.ico', String(arg));
} else {