PostHog / posthog

🦔 PostHog provides open-source product analytics, session recording, feature flagging and A/B testing that you can self-host.
https://posthog.com
Other
19.35k stars 1.13k forks source link

fix(surveys): fix bad survey value destructuring #23344

Closed dmarticus closed 4 days ago

dmarticus commented 4 days ago

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 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

image

¡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.

github-actions[bot] commented 4 days ago

Size Change: +2 B (0%)

Total Size: 1.06 MB

ℹ️ View Unchanged | Filename | Size | Change | | :--- | :---: | :---: | | `frontend/dist/toolbar.js` | 1.06 MB | +2 B (0%) |

compressed-size-action