From 25763dddd94b841077289ef276c9b31e0455fa62 Mon Sep 17 00:00:00 2001 From: trekiteasy Date: Mon, 21 Jan 2019 11:52:50 +0100 Subject: [PATCH] Code quality = != to !== --- app/components/AlbumView/index.js | 42 +++++++++++++++---------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/app/components/AlbumView/index.js b/app/components/AlbumView/index.js index 59799fb7f9..0f7bd1c62c 100644 --- a/app/components/AlbumView/index.js +++ b/app/components/AlbumView/index.js @@ -13,7 +13,7 @@ class AlbumView extends React.Component { super(props); } - getArtistName(track, album) { + getArtistName (track, album) { if (!track.artists) { return album.artists[0].name; } else { @@ -21,7 +21,7 @@ class AlbumView extends React.Component { .name; let artistName = firstArtist; _(track.artists) - .filter(artist => artist.name != firstArtist) + .filter(artist => artist.name !== firstArtist) .forEach(artist => { artistName += ' ' + artist.join + ' ' + artist.name; }); @@ -30,7 +30,7 @@ class AlbumView extends React.Component { } } - addToQueue(album, track) { + addToQueue (album, track) { this.props.addToQueue(this.props.musicSources, { artist: this.getArtistName(track, album), name: track.title, @@ -38,7 +38,7 @@ class AlbumView extends React.Component { }); } - addAlbumToQueue(album) { + addAlbumToQueue (album) { album.tracklist.map((track, i) => { this.props.addToQueue(this.props.musicSources, { artist: album.artists[0].name, @@ -48,19 +48,19 @@ class AlbumView extends React.Component { }); } - artistInfoSearch(artistId) { + artistInfoSearch (artistId) { this.props.artistInfoSearch(artistId); this.props.history.push('/artist/' + artistId); } - playAll(album) { + playAll (album) { this.props.clearQueue(); this.addAlbumToQueue(album); this.props.selectSong(0); this.props.startPlayback(); } - render() { + render () { let { album } = this.props; if (_.some(_.map([album.images, album.artists, album.genres], _.isEmpty))) { return this.renderInvalidData(); @@ -69,7 +69,7 @@ class AlbumView extends React.Component { return this.renderAlbumLoading(album, albumImage); } - renderInvalidData() { + renderInvalidData () { return (

Discogs returned invalid data.

@@ -78,7 +78,7 @@ class AlbumView extends React.Component { ); } - getAlbumImage(album) { + getAlbumImage (album) { let albumImage = _.find(album.images, { type: 'primary' }); if (!albumImage) { albumImage = album.images ? album.images[0].uri : artPlaceholder; @@ -88,7 +88,7 @@ class AlbumView extends React.Component { return albumImage; } - renderAlbumArtistName(album) { + renderAlbumArtistName (album) { return (
by{' '} @@ -104,7 +104,7 @@ class AlbumView extends React.Component { ); } - renderAlbumGenre(album) { + renderAlbumGenre (album) { return (
@@ -113,7 +113,7 @@ class AlbumView extends React.Component { ); } - renderPlayAllButton(album) { + renderPlayAllButton (album) { return ( this.playAll(album)} @@ -125,7 +125,7 @@ class AlbumView extends React.Component { ); } - renderAlbumYear(album) { + renderAlbumYear (album) { return (
@@ -134,7 +134,7 @@ class AlbumView extends React.Component { ); } - renderAlbumTracksCount(album) { + renderAlbumTracksCount (album) { return (
@@ -143,7 +143,7 @@ class AlbumView extends React.Component { ); } - renderAlbumInfoBox(album, albumImage) { + renderAlbumInfoBox (album, albumImage) { return (
@@ -162,7 +162,7 @@ class AlbumView extends React.Component { ); } - renderAlbumLoading(album, albumImage) { + renderAlbumLoading (album, albumImage) { return (
@@ -180,7 +180,7 @@ class AlbumView extends React.Component { ); } - renderAlbumTracksList(album) { + renderAlbumTracksList (album) { return ( @@ -203,7 +203,7 @@ class AlbumView extends React.Component { ); } - renderContextPopup(album, el, i) { + renderContextPopup (album, el, i) { return ( ); } - renderOptionsButtons(album) { + renderOptionsButtons (album) { return (