specify before on construct

This commit is contained in:
Paul Sealock 2019-01-15 15:01:38 +13:00
parent 66b76f5b8f
commit 01cf0eba2f
1 changed files with 1 additions and 1 deletions

View File

@ -27,7 +27,7 @@ class DateFilter extends Component {
constructor( { filter } ) {
super( ...arguments );
const [ isoAfter, isoBefore ] = Array.isArray( filter.value ) ? filter.value : [ filter.value ];
const [ isoAfter, isoBefore ] = Array.isArray( filter.value ) ? filter.value : [ null, filter.value ];
const after = isoAfter ? toMoment( isoDateFormat, isoAfter ) : null;
const before = isoBefore ? toMoment( isoDateFormat, isoBefore ) : null;