Skip to content

Commit e345ccd

Browse files
authored
Merge pull request #900 from visualize-admin/fix/embed-serialization
fix: Serialize props in embed mode
2 parents 24a6e7a + ab167a0 commit e345ccd

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

app/pages/embed/[chartId].tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import ErrorPage from "next/error";
55
import { ChartPublished } from "@/components/chart-published";
66
import { Config } from "@/configurator";
77
import { getConfig } from "@/db/config";
8+
import { serializeProps } from "@/db/serialize";
89

910
type PageProps =
1011
| {
@@ -26,7 +27,7 @@ export const getServerSideProps: GetServerSideProps<PageProps> = async ({
2627

2728
if (config && config.data) {
2829
// TODO validate configuration
29-
return { props: { status: "found", config } };
30+
return { props: serializeProps({ status: "found", config }) };
3031
}
3132

3233
res.statusCode = 404;

0 commit comments

Comments
 (0)