We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8e127e0 + ff02677 commit 265baf7Copy full SHA for 265baf7
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