diff --git a/website/src/theme/Root.tsx b/website/src/theme/Root.tsx index c69cb7cb8d..ec60099a90 100644 --- a/website/src/theme/Root.tsx +++ b/website/src/theme/Root.tsx @@ -16,9 +16,11 @@ function Root({ children }) { appName: `docs.getunleash.io-${customFields.environment}`, }; + const configIsValid = unleashConfig.clientKey && unleashConfig.url; + const [showFeedback, setShowFeedback] = React.useState(false); - if (typeof fetch !== 'undefined') { + if (configIsValid && typeof fetch !== 'undefined') { try { const unleash = new UnleashClient(unleashConfig); unleash.on('ready', () => {