Fixed: Error rending queue row when quality is missing

Fixes #3614
This commit is contained in:
Mark McDowall 2020-03-18 18:42:10 -07:00
parent 3b6d60e904
commit 8c93d73b42
2 changed files with 8 additions and 7 deletions

View File

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

View File

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