Fix comments from review

Signed-off-by: Quentin Devos <4972091+Okhoshi@users.noreply.github.com>
This commit is contained in:
Quentin Devos 2021-04-30 22:32:30 +02:00
parent 544040cea1
commit 8a4ec86259
No known key found for this signature in database
GPG Key ID: 58B4FB3465174DAF
2 changed files with 4 additions and 2 deletions

View File

@ -133,7 +133,7 @@ You can use all of the following options with the standalone version of the <red
* `payloadSampleIdx` - if set, payload sample will be inserted at this index or last. Indexes start from 0.
* `theme` - ReDoc theme. For details check [theme docs](#redoc-theme-object).
* `untrustedSpec` - if set, the spec is considered untrusted and all HTML/markdown is sanitized to prevent XSS. **Disabled by default** for performance reasons. **Enable this option if you work with untrusted user data!**
* `nonce` - if set, the provided value will be injected in every injected HTML element in the `nonce` attribute. Useful with of CSP.
* `nonce` - if set, the provided value will be injected in every injected HTML element in the `nonce` attribute. Useful when using CSP, see https://webpack.js.org/guides/csp/.
### `<redoc>` theme object
* `spacing`

View File

@ -22,7 +22,9 @@ export const RedocStandalone = function (props: RedocStandaloneProps) {
const normalizedOpts = new RedocNormalizedOptions(options);
if (normalizedOpts.nonce !== undefined) {
try {
__webpack_nonce__ = normalizedOpts.nonce;
} catch { } // If we have exception, Webpack was not used to run this.
}
return (