We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8e127e0 commit ff02677Copy full SHA for ff02677
1 file changed
src/sdk/entry.ts
@@ -23,15 +23,15 @@ const {
23
REACT_APP_CONTENTSTACK_API_HOST,
24
} = process.env;
25
26
-const customHostBaseUrl = customHostUrl(
+const customHostBaseUrl = REACT_APP_CONTENTSTACK_API_HOST? customHostUrl(
27
REACT_APP_CONTENTSTACK_API_HOST as string
28
-);
+): "";
29
30
// SDK initialization
31
const Stack = initializeContentStackSdk();
32
33
// set host url only for custom host or non prod base url's
34
-if (isValidCustomHostUrl(customHostBaseUrl)) {
+if (customHostBaseUrl && isValidCustomHostUrl(customHostBaseUrl)) {
35
Stack.setHost(customHostBaseUrl);
36
}
37
0 commit comments