Skip to content

Commit

Permalink
feat: support suspense script id
Browse files Browse the repository at this point in the history
  • Loading branch information
answershuto committed Aug 29, 2024
1 parent 4ee6240 commit aaed6b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/runtime/src/Suspense.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,6 @@ function Data(props) {
const data = useSuspenseData();

return (
<script id={props.id} dangerouslySetInnerHTML={{ __html: `!function(){window['${LOADER}'] = window['${LOADER}'] || {};window['${LOADER}']['${props.id}'] = ${JSON.stringify(data)}}();` }} />
<script id={props.id ? `suspenseScript:${props.id}` : ''} dangerouslySetInnerHTML={{ __html: `!function(){window['${LOADER}'] = window['${LOADER}'] || {};window['${LOADER}']['${props.id}'] = ${JSON.stringify(data)}}();` }} />
);
}

0 comments on commit aaed6b9

Please sign in to comment.