Skip to content

Commit 39cebdb

Browse files
rossgrambolinglingye001
authored andcommitted
Adds additional undefined check (#104)
1 parent e9db70a commit 39cebdb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/requestTracing/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export function requestTracingEnabled(): boolean {
111111

112112
function getEnvironmentVariable(name: string) {
113113
// Make it compatible with non-Node.js runtime
114-
if (typeof process?.env === "object") {
114+
if (typeof process !== "undefined" && typeof process?.env === "object") {
115115
return process.env[name];
116116
} else {
117117
return undefined;

0 commit comments

Comments
 (0)