Skip to content

Commit

Permalink
♻️ Remove global Ember. usage and rework with component import
Browse files Browse the repository at this point in the history
  • Loading branch information
Djamel BENDAOUD committed Mar 31, 2022
1 parent 06bd124 commit a2bb8e5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/ember/src/client/preview/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ import global from 'global';
import dedent from 'ts-dedent';
import { RenderContext } from '@storybook/store';
import { OptionsArgs, EmberFramework } from './types';
import Component from '@ember/component';

const { window: globalWindow, document } = global;

declare let Ember: any;

const rootEl = document.getElementById('root');

const config = globalWindow.require(`${globalWindow.STORYBOOK_NAME}/config/environment`);
Expand Down Expand Up @@ -38,7 +37,7 @@ function render(options: OptionsArgs, el: HTMLElement) {
.then((instance: any) => {
instance.register(
'component:story-mode',
Ember.Component.extend({
Component.extend({
layout: template || options,
...context,
})
Expand Down

0 comments on commit a2bb8e5

Please sign in to comment.