From 8a4ec86259bdc7186841b9abb6f1269812959eb9 Mon Sep 17 00:00:00 2001 From: Quentin Devos <4972091+Okhoshi@users.noreply.github.com> Date: Fri, 30 Apr 2021 22:32:30 +0200 Subject: [PATCH] Fix comments from review Signed-off-by: Quentin Devos <4972091+Okhoshi@users.noreply.github.com> --- README.md | 2 +- src/components/RedocStandalone.tsx | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) 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 (