SDA-3574 - Fix the condition to validate undefined (#1337)

This commit is contained in:
Kiran Niranjan 2022-02-02 14:08:16 +05:30 committed by GitHub
parent 5fbe4fbca6
commit bf86783621
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,7 +32,7 @@ class AppStateHandler {
this.id = powerSaveBlocker.start('prevent-display-sleep');
logger.info('App-state: Prevent display to sleep, id: ' + this.id);
} else {
if (this.id) {
if (this.id !== undefined) {
logger.info('App-state: Allow display to sleep, id: ' + this.id);
powerSaveBlocker.stop(this.id);
this.id = undefined;