From 086640519ac6065297f7d87ba0df6719e3341bcd Mon Sep 17 00:00:00 2001 From: Qstick Date: Fri, 20 Mar 2020 22:43:51 -0400 Subject: [PATCH] Fixed: Error Rendering Queue Row on Null Quality Co-Authored-By: Mark McDowall --- frontend/src/Activity/Queue/QueueRow.js | 10 +++++++--- frontend/src/Activity/Queue/QueueRowConnector.js | 11 +++++------ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/frontend/src/Activity/Queue/QueueRow.js b/frontend/src/Activity/Queue/QueueRow.js index 5f9a1d810..b1112ef56 100644 --- a/frontend/src/Activity/Queue/QueueRow.js +++ b/frontend/src/Activity/Queue/QueueRow.js @@ -163,9 +163,13 @@ class QueueRow extends Component { if (name === 'quality') { return ( - + { + quality ? + : + null + } ); } diff --git a/frontend/src/Activity/Queue/QueueRowConnector.js b/frontend/src/Activity/Queue/QueueRowConnector.js index 210aa2d75..c486656eb 100644 --- a/frontend/src/Activity/Queue/QueueRowConnector.js +++ b/frontend/src/Activity/Queue/QueueRowConnector.js @@ -1,4 +1,3 @@ -import _ from 'lodash'; import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { connect } from 'react-redux'; @@ -13,11 +12,11 @@ function createMapStateToProps() { createMovieSelector(), createUISettingsSelector(), (movie, uiSettings) => { - const result = _.pick(uiSettings, [ - 'showRelativeDates', - 'shortDateFormat', - 'timeFormat' - ]); + const result = { + showRelativeDates: uiSettings.showRelativeDates, + shortDateFormat: uiSettings.shortDateFormat, + timeFormat: uiSettings.timeFormat + }; result.movie = movie;