Skip to content

Commit

Permalink
EWPP-2017: Fixing date filter second value initialization.
Browse files Browse the repository at this point in the history
  • Loading branch information
upchuk committed Mar 1, 2022
1 parent f2aacd0 commit f15bf4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Plugin/facets/query_type/Date.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ public function build() {

$operator = $active_filters['operator'];
$first_date = $active_filters['first'];
$second_date = $active_filters['second'] ?? $active_filters['second'];

$operators = [
'gt' => $this->t('After'),
Expand All @@ -107,6 +106,7 @@ public function build() {
}

if ($operator === 'bt') {
$second_date = $active_filters['second'];
$display = new FormattableMarkup('@operator @first and @second', [
'@operator' => $operators[$operator],
'@first' => $first_date->format('j F Y'),
Expand Down

0 comments on commit f15bf4a

Please sign in to comment.