Skip to content

Commit 8f3b9f7

Browse files
committed
Fix cycle
This assertion was only added to satisfy typescript. It creates a module cycle and isn't worth it.
1 parent f888659 commit 8f3b9f7

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/@ember/engine/instance.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { ContainerProxyMixin, RegistryProxyMixin } from '@ember/-internals/runti
1212
import type { InternalOwner } from '@ember/-internals/owner';
1313
import type Owner from '@ember/-internals/owner';
1414
import { type FullName, isFactory } from '@ember/-internals/owner';
15-
import Engine from '@ember/engine';
15+
import type Engine from '@ember/engine';
1616
import type Application from '@ember/application';
1717
import type { BootEnvironment } from '@ember/-internals/glimmer';
1818
import type { SimpleElement } from '@simple-dom/interface';
@@ -199,16 +199,14 @@ class EngineInstance extends EmberObject.extend(RegistryProxyMixin, ContainerPro
199199
@return {EngineInstance,Error}
200200
*/
201201
buildChildEngineInstance(name: string, options: EngineInstanceOptions = {}): EngineInstance {
202-
let ChildEngine = this.lookup(`engine:${name}`);
202+
let ChildEngine = this.lookup(`engine:${name}`) as Engine;
203203

204204
if (!ChildEngine) {
205205
throw new Error(
206206
`You attempted to mount the engine '${name}', but it is not registered with its parent.`
207207
);
208208
}
209209

210-
assert('expected an Engine', ChildEngine instanceof Engine);
211-
212210
let engineInstance = ChildEngine.buildInstance(options);
213211

214212
setEngineParent(engineInstance, this);

0 commit comments

Comments
 (0)