Skip to content

Commit

Permalink
fix inability to handle an optional value in timestamp override
Browse files Browse the repository at this point in the history
  • Loading branch information
maximpn committed Dec 17, 2024
1 parent 9348745 commit 0d3d4de
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,11 @@ function TimestampFallbackDisabled() {
return null;
}

export function timestampOverrideDeserializer(defaultValue: FormData) {
export function timestampOverrideDeserializer(_: unknown, finalDiffableRule: DiffableRule) {
return {
timestampOverride: defaultValue.timestamp_override.field_name,
timestampOverrideFallbackDisabled: defaultValue.timestamp_override.fallback_disabled ?? false,
timestampOverride: finalDiffableRule.timestamp_override?.field_name,
timestampOverrideFallbackDisabled:
finalDiffableRule.timestamp_override?.fallback_disabled ?? false,
};
}

Expand Down

0 comments on commit 0d3d4de

Please sign in to comment.