@equinor/fusion
Advanced tools
Comparing version 3.4.9 to 3.4.10-beta.0
@@ -15,2 +15,7 @@ import ApiClients from '../http/apiClients'; | ||
}; | ||
declare global { | ||
interface Window { | ||
__FUSION_CONTEXT_ENSURE__CONTEXT__: Promise<void> | undefined; | ||
} | ||
} | ||
export default class ContextManager extends ReliableDictionary<ContextCache> { | ||
@@ -17,0 +22,0 @@ private appContainer; |
@@ -100,3 +100,12 @@ import { useState, useCallback, useEffect, useReducer } from 'react'; | ||
if ((currentContext === null || currentContext === void 0 ? void 0 : currentContext.id) === (context === null || context === void 0 ? void 0 : context.id)) { | ||
return this.ensureCurrentContextExistsInUrl(); | ||
if (!window.__FUSION_CONTEXT_ENSURE__CONTEXT__) { | ||
window.__FUSION_CONTEXT_ENSURE__CONTEXT__ = new Promise((resolve) => { | ||
window.requestAnimationFrame(() => this.ensureCurrentContextExistsInUrl() | ||
.then(resolve) | ||
.finally(() => { | ||
window.__FUSION_CONTEXT_ENSURE__CONTEXT__ = undefined; | ||
})); | ||
}); | ||
} | ||
return await window.__FUSION_CONTEXT_ENSURE__CONTEXT__; | ||
} | ||
@@ -103,0 +112,0 @@ await this.setAsync('current', context); |
@@ -1,2 +0,2 @@ | ||
declare const _default: "3.4.9"; | ||
declare const _default: "3.4.10-beta.0"; | ||
export default _default; |
@@ -1,1 +0,1 @@ | ||
export default '3.4.9'; | ||
export default '3.4.10-beta.0'; |
{ | ||
"name": "@equinor/fusion", | ||
"version": "3.4.9", | ||
"version": "3.4.10-beta.0", | ||
"description": "Everything a Fusion app needs to communicate with the core", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
415487
9841
1