浏览代码

Merge pull request #13393 from miguelvazq/HPCC-23556

HPCC-23556 GlobalThis undefined in Edge

Reviewed-By: Gordon Smith <gordon.smith@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 5 年之前
父节点
当前提交
a99b0b7ba2
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      esp/src/src/KeyValStore.ts

+ 3 - 1
esp/src/src/KeyValStore.ts

@@ -1,6 +1,8 @@
 import { Store, ValueChangedMessage } from "@hpcc-js/comms";
 import { Dispatch, IObserverHandle } from "@hpcc-js/util";
 
+declare const dojoConfig;
+
 export interface IKeyValStore {
     set(key: string, value: string, broadcast?: boolean): Promise<void>;
     get(key: string, broadcast?: boolean): Promise<string | undefined>;
@@ -24,7 +26,7 @@ export function globalKeyValStore(): IKeyValStore {
  *      No push notifications outside of current tab
  **/
 export function userKeyValStore(): IKeyValStore {
-    const userName = globalThis.dojoConfig.username;
+    const userName = dojoConfig.username;
     if (!userName) {
         //  Fallback to local storage  ---
         return localKeyValStore();