Skip to content

Commit

Permalink
Fixed bug where a null track can cause a crash
Browse files Browse the repository at this point in the history
Update to version 1.5.3
  • Loading branch information
OrionNebula committed Jun 8, 2018
1 parent 11ffa85 commit 0038552
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hyper-media-control",
"version": "1.5.2",
"version": "1.5.3",
"description": "Extensible media player controller for Hyper.",
"main": "dist/index",
"typings": "dist/index",
Expand Down
2 changes: 1 addition & 1 deletion src/components/MediaBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function MediaBarFactory (React: typeof ExternReact) {
<Button title='Next' click={plugin.nextTrack && (() => this.handleActionResult(plugin.nextTrack()))} iconUrl={iconUrls.nextIconUrl} />
{ this.hyperMedia.shuffleRepeat ? <Button title={'Repeat'} style={{ marginLeft: 6 }} click={plugin.toggleRepeat && (() => this.handleActionResult(plugin.toggleRepeat()))} iconUrl={status.repeat === 'none' ? iconUrls.repeatOffIconUrl : (status.repeat === 'one' ? iconUrls.repeatOnceIconUrl : iconUrls.repeatOnIconUrl)} /> : ''}
</div>
{ status.state !== State.Stopped ? <TrackInfo status={status} /> : ''}
{ status.state !== State.Stopped && status.track ? <TrackInfo status={status} /> : ''}
{ this.hyperMedia.showArtwork && status.track && status.track.coverUrl && <img src={status.track.coverUrl} style={artworkStyle} />}
</div>
}
Expand Down

0 comments on commit 0038552

Please sign in to comment.