mirror of
https://github.com/formbricks/formbricks.git
synced 2026-05-25 03:10:22 -05:00
b9a81f75f9
parseQueryToState was casting Cube's persisted [isoString, isoString] dateRange straight into TimeDimensionConfig's [Date, Date] without converting the elements. Editing a saved time-based chart and re-running buildCubeQuery then called formatDate on a string, blowing up with "date.getFullYear is not a function". - parseQueryToState now lifts the array entries through new Date(...) so the chart-builder state matches its declared shape. - formatDate defensively accepts Date | string and coerces before use, so any other entry point handing us strings can't reproduce the crash.