We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8710ac5 commit 2ca2823Copy full SHA for 2ca2823
1 file 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
0 commit comments