Skip to content

Commit

Permalink
Fix 'global' is undefined exception in browser env
Browse files Browse the repository at this point in the history
When trying to use pro-gallery in browser app in non-wix environment the
library load fails with 'global is undefined' exception as its not
defined in general case.
  • Loading branch information
dragonofdeath committed Jul 30, 2024
1 parent 131e112 commit 9eaac8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/lib/src/common/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ class Utils {

// TODO : Replace with isPrerender mode
isSSR() {
return typeof global?.window === 'undefined';
return typeof global !== 'undefined' && typeof global?.window === 'undefined';
}

isOOI() {
Expand Down

0 comments on commit 9eaac8d

Please sign in to comment.