-
-
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.
[BUGFIX lts] Ensure custom modifier managers are not invoked in SSR.
Prior to this change, custom modifier managers were invoked during non-interactive rendering invocations as well as interactive. In practice, that resulted in custom modifiers erroring whenever they ran in FastBoot / SSR environments. This change, ensures that the interactive / non-interactive state is threaded through to the required infrastructure to avoid invoking _any_ hooks on custom modifier managers when running in non-interactive modes. (cherry picked from commit a3c0b5e)
- Loading branch information
Showing
4 changed files
with
47 additions
and
9 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
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
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
10 changes: 8 additions & 2 deletions
10
packages/@ember/-internals/glimmer/lib/template-compiler.ts
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,9 +1,15 @@ | ||
import { Compiler } from '@glimmer/interfaces'; | ||
import RuntimeResolver from './resolver'; | ||
|
||
export interface ICompilerOptions { | ||
environment: { | ||
isInteractive: boolean; | ||
}; | ||
} | ||
|
||
// factory for DI | ||
export default { | ||
create(): Compiler { | ||
return new RuntimeResolver().compiler; | ||
create({ environment }: ICompilerOptions): Compiler { | ||
return new RuntimeResolver(environment.isInteractive).compiler; | ||
}, | ||
}; |