Skip to content

Commit

Permalink
[BUGFIX] ember-template-compiler & fastboot compatability
Browse files Browse the repository at this point in the history
When importing ember-template-compiler as part of the dist bundle, it's initialiser for dom tempaltes
comes along aswell.

While this would just be extra bytes for no reason normally, when used in conjunction with fastboot.
It throws a document is undefined error, within the bootstrap module.
  • Loading branch information
billybonks committed Jun 7, 2019
1 parent 3c4bca4 commit 082bb0c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/ember-template-compiler/lib/system/initializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,9 @@ if (
Application.initializer({
name: 'domTemplates',
initialize() {
let context;
if (hasDOM) {
context = document;
bootstrap({ context: document, hasTemplate, setTemplate });
}

bootstrap({ context, hasTemplate, setTemplate });
},
});
}

0 comments on commit 082bb0c

Please sign in to comment.