mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-05 17:53:12 +02:00
docs: only initialize unleash if config is valid
This commit is contained in:
parent
a91089d904
commit
b252c07499
@ -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', () => {
|
||||
|
Loading…
Reference in New Issue
Block a user