Skip to content

Commit

Permalink
fixed stop prevent-app-suspension when paused #104
Browse files Browse the repository at this point in the history
  • Loading branch information
juvirez committed Jan 29, 2022
1 parent 0621b84 commit a379f47
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/features/preventSleepWhilePlaying.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ ipcMain.on("changeState", (_event, state) => {
if (!powerSaveBlockerId) {
powerSaveBlockerId = powerSaveBlocker.start('prevent-app-suspension')
}
} else if (powerSaveBlockerId) {
} else if (powerSaveBlockerId !== null) {
powerSaveBlocker.stop(powerSaveBlockerId)
powerSaveBlockerId = null;
}
});

0 comments on commit a379f47

Please sign in to comment.