We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug
I'm using RedocStandalone react component to render open api spec object.
RedocStandalone
<RedocStandalone spec={graphqlServerResp.openAPI3Schema} />
I'm getting this crash:
TypeError: Cannot assign to read only property 'components' of object '#<Object>'
I tracked down the place where the crash is happening. It's in @redocly/openapi-core package on this line: https://github.com/Redocly/redocly-cli/blob/a3f955768baf6875911324582bc1f5c6c72b29ad/packages/core/src/bundle.ts#L260
@redocly/openapi-core
The code tries to modify the passed object but fails. I believe it is caused by the fact that the spec object is being immutable.
To workaround the problem I make a copy of an object before passing it in to the component like so
<RedocStandalone spec={{...graphqlServerResp.openAPI3Schema}} />
and the crash is gone.
To Reproduce Pass an immutable spec object.
Expected behavior No crash
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Describe the bug
I'm using
RedocStandalone
react component to render open api spec object.I'm getting this crash:
I tracked down the place where the crash is happening. It's in
@redocly/openapi-core
package on this line:https://github.com/Redocly/redocly-cli/blob/a3f955768baf6875911324582bc1f5c6c72b29ad/packages/core/src/bundle.ts#L260
The code tries to modify the passed object but fails. I believe it is caused by the fact that the spec object is being immutable.
To workaround the problem I make a copy of an object before passing it in to the component like so
and the crash is gone.
To Reproduce
Pass an immutable spec object.
Expected behavior
No crash
The text was updated successfully, but these errors were encountered: