fixing date/time filter keys (#3611)

This commit is contained in:
Jeff Niu 2017-10-07 13:07:23 -07:00 committed by Maxime Beauchemin
parent 6f1351fbbb
commit 912c6f6231
1 changed files with 4 additions and 1 deletions

View File

@ -149,7 +149,10 @@ class FilterBox extends React.Component {
// Add created options to filtersChoices, even though it doesn't exist,
// or these options will exist in query sql but invisible to end user.
for (const filterKey in this.state.selectedValues) {
if (!this.state.selectedValues.hasOwnProperty(filterKey)) {
if (
!this.state.selectedValues.hasOwnProperty(filterKey) ||
!(filterKey in this.props.filtersChoices)
) {
continue;
}
const existValues = this.props.filtersChoices[filterKey].map(f => f.id);