We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8710ac5 commit 26e63f9Copy full SHA for 26e63f9
2 files changed
src/index.ts
@@ -71,8 +71,9 @@ class LightLivePreviewHoC {
71
}
72
73
const ContentstackLivePreview =
74
- process?.env?.PURGE_PREVIEW_SDK === "true" ||
75
- process?.env?.REACT_APP_PURGE_PREVIEW_SDK === "true"
+ typeof process !== "undefined" &&
+ (process?.env?.PURGE_PREVIEW_SDK === "true" ||
76
+ process?.env?.REACT_APP_PURGE_PREVIEW_SDK === "true")
77
? LightLivePreviewHoC
78
: ContentstackLivePreviewHOC;
79
src/logger/logger.ts
@@ -8,7 +8,10 @@ export class PublicLogger {
8
| Console["info"],
9
message: any[]
10
): void {
11
- if (process?.env?.NODE_ENV !== "test") {
+ if (
12
13
+ process?.env?.NODE_ENV !== "test"
14
+ ) {
15
logCallback("Live_Preview_SDK:", ...message);
16
17
0 commit comments