Skip to content

Commit

Permalink
Remove redundant undefined check
Browse files Browse the repository at this point in the history
Co-authored-by: PikachuEXE <pikachuexe@gmail.com>
  • Loading branch information
absidue and PikachuEXE authored Dec 12, 2022
1 parent 01a8eef commit 825f595
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/renderer/components/playlist-info/playlist-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ export default Vue.extend({
this.infoSource = this.data.infoSource

// Causes errors if not put inside of a check
if (typeof (this.data.viewCount) !== 'undefined' && !isNaN(this.data.viewCount)) {
if (!isNaN(this.data.viewCount)) {
this.viewCount = this.hideViews ? null : Intl.NumberFormat(this.currentLocale).format(this.data.viewCount)
}

if (typeof (this.data.videoCount) !== 'undefined' && !isNaN(this.data.videoCount)) {
if (!isNaN(this.data.viewCount)) {
this.videoCount = Intl.NumberFormat(this.currentLocale).format(this.data.videoCount)
}

Expand Down

0 comments on commit 825f595

Please sign in to comment.