-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
11 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
import { VERSION } from '@ember/version'; | ||
import Adapters from './adapters'; | ||
import MainModule from './main'; | ||
import type Adapters from './adapters'; | ||
import { guidFor } from '@ember/object/internals'; | ||
import { A } from '@ember/array'; | ||
import Namespace from '@ember/application/namespace'; | ||
|
@@ -15,14 +14,15 @@ export function setupEmberInspectorSupport() { | |
window.addEventListener('ember-inspector-loaded' as any, (event: CustomEvent) => { | ||
const adapter = event.detail.adapter; | ||
const EMBER_VERSIONS_SUPPORTED = event.detail.EMBER_VERSIONS_SUPPORTED; | ||
loadEmberDebug(adapter, EMBER_VERSIONS_SUPPORTED); | ||
void loadEmberDebug(adapter, EMBER_VERSIONS_SUPPORTED); | ||
}); | ||
|
||
const e = new Event('ember-inspector-support-setup'); | ||
window.dispatchEvent(e); | ||
} | ||
|
||
function loadEmberDebug( | ||
// eslint-disable-next-line disable-features/disable-async-await | ||
async function loadEmberDebug( | ||
adapter: keyof typeof Adapters, | ||
EMBER_VERSIONS_SUPPORTED: [string, string] | ||
) { | ||
|
@@ -32,6 +32,11 @@ function loadEmberDebug( | |
return; | ||
} | ||
|
||
// @ts-ignore | ||
Check warning on line 35 in packages/@ember/debug/ember-inspector-support/index.ts GitHub Actions / Linting
|
||
const Adapters = await import('./adapters'); | ||
// @ts-ignore | ||
Check warning on line 37 in packages/@ember/debug/ember-inspector-support/index.ts GitHub Actions / Linting
|
||
const MainModule = await import('./main'); | ||
|
||
if (!versionTest(VERSION, EMBER_VERSIONS_SUPPORTED)) { | ||
// Wrong inspector version. Redirect to the correct version. | ||
sendVersionMiss(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters