Skip to content

Commit

Permalink
Fix fastboot ReferenceError: document is not defined (#835)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkszepp authored Mar 13, 2024
1 parent 3194bcd commit 4b4da15
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default class BasicDropdownWormholeComponent extends Component<BasicDropd

if (config.environment === 'test') {
// document doesn't exists in fastboot apps, for this reason we need this check
if (!document) {
if (typeof document === 'undefined') {
return '';
}
const rootElement = config['APP']?.rootElement;
Expand Down
2 changes: 1 addition & 1 deletion ember-basic-dropdown/src/components/basic-dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ export default class BasicDropdown extends Component<BasicDropdownSignature> {

if (config.environment === 'test') {
// document doesn't exists in fastboot apps, for this reason we need this check
if (!document) {
if (typeof document === 'undefined') {
return 'ember-basic-dropdown-wormhole';
}
const rootElement = config['APP']?.rootElement;
Expand Down

0 comments on commit 4b4da15

Please sign in to comment.