Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(quill): handle null Select onValueChange value (#61128)

Raúl Negrón-Oterof1545116227e
diff --git a/packages/quill/packages/components/src/date-time-picker.tsx b/packages/quill/packages/components/src/date-time-picker.tsx
index 14372806223d..0f388f6ea3bd 100644
--- a/packages/quill/packages/components/src/date-time-picker.tsx
+++ b/packages/quill/packages/components/src/date-time-picker.tsx
@@ -261,7 +261,11 @@ function Calendar({
</Button>
<Select
value={currentKey}
- onValueChange={(v: number) => handleMonthYearSelect(v)}
+ onValueChange={(v) => {
+ if (v !== null) {
+ handleMonthYearSelect(v)
+ }
+ }}
>
<SelectTrigger size="sm" aria-label="Month and year" className="h-6 px-2 text-xs">
<SelectValue>