We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d25e95f commit cfd481fCopy full SHA for cfd481f
dotcom-rendering/src/lib/braze/forceBrazeMessage.ts
@@ -1,14 +1,11 @@
1
-const runtimeHostname = () => {
2
- try {
3
- if (typeof process !== 'undefined' && process.env.HOSTNAME) {
4
- return process.env.HOSTNAME;
5
- }
6
- } catch {
7
- /* ignore */
+const runtimeHostname = (): string | undefined => {
+ if (typeof process !== 'undefined' && process.env.HOSTNAME) {
+ return process.env.HOSTNAME;
8
}
9
if (typeof window !== 'undefined' && window.location.hostname) {
10
return window.location.hostname;
11
+ return undefined;
12
};
13
14
const FORCE_BRAZE_ALLOWLIST = [
0 commit comments