Skip to content

Commit

Permalink
Fixed the promise in isAvailable (#278)
Browse files Browse the repository at this point in the history
On branch patch-isAvailable
Changes to be committed:
	modified:   ../src/samsung.ts

Co-authored-by: Anil Kumar <[email protected]>
  • Loading branch information
anikumar-tivo and Anil Kumar authored Jul 16, 2022
1 parent a4bfb73 commit 1714d48
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/samsung.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,10 @@ class Samsung {
'isAvailable',
)
resolve(true)
} else {
this.LOGGER.error('TV is not available', { err }, 'isAvailable')
resolve(false)
}

this.LOGGER.error('TV is not available', { err }, 'isAvailable')
resolve(false)
},
)
})
Expand Down Expand Up @@ -527,7 +527,7 @@ class Samsung {
fs.writeFileSync(this.TOKEN_FILE, token)
} catch (err) {
console.log('File error!')
this.LOGGER.error('catch fil esave', err, '_saveTokenToFile')
this.LOGGER.error('catch fil esave', { err }, '_saveTokenToFile')
}
}

Expand All @@ -539,7 +539,7 @@ class Samsung {
return fileData.toString()
} catch (err) {
console.log('File error!')
this.LOGGER.error('if (this.SAVE_TOKEN)', err, 'constructor')
this.LOGGER.error('if (this.SAVE_TOKEN)', { err }, 'constructor')
return null
}
}
Expand Down

0 comments on commit 1714d48

Please sign in to comment.