diff --git a/src/fields/conditions/MoneyFieldConditionRule.php b/src/fields/conditions/MoneyFieldConditionRule.php index 356789d21c2..4f9d360ddaa 100644 --- a/src/fields/conditions/MoneyFieldConditionRule.php +++ b/src/fields/conditions/MoneyFieldConditionRule.php @@ -103,10 +103,8 @@ protected function inputHtml(): string */ protected function inputOptions(): array { + /** @var Money $field */ $field = $this->field(); - if (!$field instanceof Money) { - throw new InvalidConfigException(); - } $defaultValue = null; if ($field->defaultValue !== null) { $defaultValue = MoneyHelper::toNumber(new MoneyLibrary($field->defaultValue, new Currency($field->currency))); @@ -136,6 +134,10 @@ protected function inputOptions(): array */ protected function elementQueryParam(): ?string { + if (!$this->field() instanceof Money) { + return null; + } + return $this->paramValue(); } @@ -145,8 +147,7 @@ protected function elementQueryParam(): ?string protected function matchFieldValue($value): bool { if (!$this->field() instanceof Money) { - // No longer a Money field - return false; + return true; } /** @var int|float|null $value */