Skip to content

Commit 31b2b5c

Browse files
committed
change
1 parent 418e056 commit 31b2b5c

File tree

1 file changed

+4
-5
lines changed
  • frontend/src/components/blocks-renderer

1 file changed

+4
-5
lines changed

frontend/src/components/blocks-renderer/index.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export const BlocksRenderer = ({ blocks, blocksProps }: Props) => {
6565

6666
export const blocksDataFetching = (client, blocks, language) => {
6767
const promises = [];
68-
let staticProps = {};
68+
const staticProps = {};
6969

7070
for (const block of blocks) {
7171
const component = REGISTRY[block.__typename];
@@ -80,11 +80,10 @@ export const blocksDataFetching = (client, blocks, language) => {
8080
}
8181

8282
const getStaticProps = component.getStaticProps;
83+
84+
staticProps[block.id] = {};
8385
if (getStaticProps) {
84-
staticProps = {
85-
...staticProps,
86-
[block.id]: getStaticProps(block),
87-
};
86+
staticProps[block.id] = getStaticProps(block);
8887
}
8988
}
9089

0 commit comments

Comments
 (0)