ember-bootstrap
Version:
Bootstrap components for Ember.js
15 lines (13 loc) • 425 B
text/typescript
import { getOwner } from '@ember/application';
import type FastBootService from 'ember-cli-fastboot/services/fastboot';
export default function isFastBoot(context: object) {
const owner = getOwner(context);
if (!owner) {
return false;
}
const fastbootService = owner.lookup('service:fastboot') as
| FastBootService
| undefined
| null;
return fastbootService ? fastbootService.isFastBoot : false;
}