File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -44,9 +44,14 @@ const loader = function AppConfigLoader(this: Loader) {
44
44
45
45
const globalNamespace = (typeof window === 'undefined' ? globalThis : window) || {};
46
46
47
- // if the global was already defined, use it (and define it if not)
48
- const config = globalNamespace.${ privateName } =
49
- (globalNamespace.${ privateName } || configValue);
47
+ // if the global was already defined, use it
48
+ const config = (globalNamespace.${ privateName } || configValue);
49
+
50
+ // if the global is frozen then it was set by electron and we can't change it, but we'll set it if we can
51
+ if (!Object.isFrozen(globalNamespace.${ privateName } )) {
52
+ globalNamespace.${ privateName } = config;
53
+ }
54
+
50
55
51
56
export { config };
52
57
export default config;
You can’t perform that action at this time.
0 commit comments