diff --git a/README.md b/README.md index 36867da2..7e5ad3ed 100644 --- a/README.md +++ b/README.md @@ -133,7 +133,7 @@ You can use all of the following options with the standalone version of the ` theme object * `spacing` diff --git a/src/components/RedocStandalone.tsx b/src/components/RedocStandalone.tsx index 0f436558..890dfa24 100644 --- a/src/components/RedocStandalone.tsx +++ b/src/components/RedocStandalone.tsx @@ -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 (