@amedia/user 0.13.41 → 0.13.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/user.cjs +1 -1
- package/dist/user.cjs.map +2 -2
- package/dist/user.js +1 -1
- package/dist/user.js.map +2 -2
- package/package.json +1 -1
- package/src/cache/engines/global.ts +1 -1
- package/src/janitor/index.ts +2 -1
- package/src/utils/customEventWrapper.ts +2 -1
package/package.json
CHANGED
package/src/janitor/index.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { dispatch, listenWithExclusivity } from '../utils/customEventWrapper';
|
|
|
4
4
|
import { attemptAutoLoginJob } from '../autologin';
|
|
5
5
|
import daxSubCookieHandler from './jobs/daxsubCookie';
|
|
6
6
|
import log from '../utils/log';
|
|
7
|
+
import getGlobalThis from '../utils/getGlobalThis';
|
|
7
8
|
|
|
8
9
|
const jobs = [
|
|
9
10
|
attemptAutoLoginJob,
|
|
@@ -17,7 +18,7 @@ async function performJobs() {
|
|
|
17
18
|
// None of our current jobs make any sense to run in a web worker or other settings without a window object.
|
|
18
19
|
return;
|
|
19
20
|
}
|
|
20
|
-
if (
|
|
21
|
+
if (getGlobalThis()?.location?.hostname === 'localhost') {
|
|
21
22
|
// Neither if we're running on localhost as this will never be able to resolve any data
|
|
22
23
|
// eslint-disable-next-line no-console
|
|
23
24
|
log.warn(
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import log from './log';
|
|
2
|
+
import getGlobalThis from './getGlobalThis';
|
|
2
3
|
|
|
3
4
|
let rootElement: Window | Element | typeof globalThis;
|
|
4
5
|
|
|
@@ -6,7 +7,7 @@ export const setRootElement = (element: typeof rootElement) => {
|
|
|
6
7
|
rootElement = element;
|
|
7
8
|
};
|
|
8
9
|
|
|
9
|
-
setRootElement(
|
|
10
|
+
setRootElement(getGlobalThis());
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* This listener MUST be used by all listeners in ../eventHandlers
|