We had a support ticket where a user was using APIs to create our surveys and had a null SurveyAppearance field. posthog-js accepted those types fine but for some reason the posthog types weren't synced up with it. When I added this field a few weeks ago I didn't double-check that the types were synced. Leads to an error like this
¡que feo!
Changes
Fix the type and destructure it correctly.
Does this work well for both Cloud and self-hosted?
Problem
We had a support ticket where a user was using APIs to create our surveys and had a
null
SurveyAppearance field.posthog-js
accepted those types fine but for some reason theposthog
types weren't synced up with it. When I added this field a few weeks ago I didn't double-check that the types were synced. Leads to an error like this¡que feo!
Changes
Fix the type and destructure it correctly.
Does this work well for both Cloud and self-hosted?
Yes
How did you test this code?
Manually tested, works great.