Skip to content

Commit

Permalink
[FIX] This fixes ember-canary
Browse files Browse the repository at this point in the history
ember-canary requires `template` + `environment` be provided to the view. This seems like a reasonable change, but does require “low level” libraries such as `@ember/test-helpers` to make some changes.

(Ember PR emberjs/ember.js#19680)
  • Loading branch information
stefanpenner committed Aug 23, 2021
1 parent 9219247 commit e2904bd
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,14 @@ export default function setupRenderingContext(
let OutletView = owner.factoryFor
? owner.factoryFor('view:-outlet')
: owner._lookupFactory!('view:-outlet');
let toplevelView = OutletView.create();

let environment = owner.lookup('-environment:main');
let template = owner.lookup('template:-outlet');

let toplevelView = OutletView.create({
template,
environment,
});

owner.register('-top-level-view:main', {
create() {
Expand Down

0 comments on commit e2904bd

Please sign in to comment.