Fixed: Error rending queue row when quality is missing

pull/1689/head
Qstick 4 years ago
parent 0472b43a9c
commit a773f9e135

@ -188,9 +188,13 @@ class QueueRow extends Component {
if (name === 'quality') { if (name === 'quality') {
return ( return (
<TableRowCell key={name}> <TableRowCell key={name}>
<TrackQuality {
quality={quality} quality ?
/> <TrackQuality
quality={quality}
/> :
null
}
</TableRowCell> </TableRowCell>
); );
} }

@ -1,4 +1,3 @@
import _ from 'lodash';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import React, { Component } from 'react'; import React, { Component } from 'react';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
@ -15,11 +14,11 @@ function createMapStateToProps() {
createAlbumSelector(), createAlbumSelector(),
createUISettingsSelector(), createUISettingsSelector(),
(artist, album, uiSettings) => { (artist, album, uiSettings) => {
const result = _.pick(uiSettings, [ const result = {
'showRelativeDates', showRelativeDates: uiSettings.showRelativeDates,
'shortDateFormat', shortDateFormat: uiSettings.shortDateFormat,
'timeFormat' timeFormat: uiSettings.timeFormat
]); };
result.artist = artist; result.artist = artist;
result.album = album; result.album = album;

Loading…
Cancel
Save