fix: error with immutable object spec

This commit is contained in:
Alex Varchuk 2022-10-03 21:38:08 +03:00
parent 127ef260b9
commit 0bd4484cfb
No known key found for this signature in database
GPG Key ID: F1FD9569DC4AED04

View File

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