mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-07 13:44:54 +03:00
Fix comments from review
Signed-off-by: Quentin Devos <4972091+Okhoshi@users.noreply.github.com>
This commit is contained in:
parent
544040cea1
commit
8a4ec86259
|
@ -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`
|
||||
|
|
|
@ -22,7 +22,9 @@ export const RedocStandalone = function (props: RedocStandaloneProps) {
|
|||
const normalizedOpts = new RedocNormalizedOptions(options);
|
||||
|
||||
if (normalizedOpts.nonce !== undefined) {
|
||||
__webpack_nonce__ = normalizedOpts.nonce;
|
||||
try {
|
||||
__webpack_nonce__ = normalizedOpts.nonce;
|
||||
} catch { } // If we have exception, Webpack was not used to run this.
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
Loading…
Reference in New Issue
Block a user