fix(core): update

This commit is contained in:
2020-07-27 18:23:47 +00:00
parent 7655fc0348
commit 899775b050
3 changed files with 32 additions and 19 deletions

View File

@ -38,10 +38,13 @@ export class DomTools {
return domToolsInstance;
}
public static getDomToolsSync() {
/**
* if you can, use the static asysnc .setupDomTools() function instead since it is safer to use.
*/
public static getGlobalDomToolsSync() {
const globalDomTools: DomTools = globalThis.deesDomTools;
if (!globalDomTools) {
throw new Error('You tried to access domtools synchronouly too early');
throw new Error('You tried to access domtools synchronously too early');
}
return globalThis.deesDomTools;
}