Skip to content

Commit 53c4f36

Browse files
authored
fix: error with immutable object spec (#2179)
1 parent cc9818c commit 53c4f36

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/components/RedocStandalone.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,12 @@ export const RedocStandalone = function (props: RedocStandaloneProps) {
3434

3535
return (
3636
<ErrorBoundary>
37-
<StoreBuilder spec={spec} specUrl={specUrl} options={options} onLoaded={onLoaded}>
37+
<StoreBuilder
38+
spec={spec ? { ...spec } : undefined}
39+
specUrl={specUrl}
40+
options={options}
41+
onLoaded={onLoaded}
42+
>
3843
{({ loading, store }) =>
3944
!loading ? (
4045
<Redoc store={store!} />

0 commit comments

Comments
 (0)