fix: error with immutable object spec (#2179)

This commit is contained in:
Alex Varchuk 2022-10-11 13:39:30 +03:00 committed by GitHub
parent cc9818ca41
commit 53c4f36fad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,7 +34,12 @@ export const RedocStandalone = function (props: RedocStandaloneProps) {
return ( return (
<ErrorBoundary> <ErrorBoundary>
<StoreBuilder spec={spec} specUrl={specUrl} options={options} onLoaded={onLoaded}> <StoreBuilder
spec={spec ? { ...spec } : undefined}
specUrl={specUrl}
options={options}
onLoaded={onLoaded}
>
{({ loading, store }) => {({ loading, store }) =>
!loading ? ( !loading ? (
<Redoc store={store!} /> <Redoc store={store!} />