Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ember: Remove global Ember usage #17843

Merged
merged 5 commits into from Jul 3, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 2 additions & 3 deletions app/ember/src/client/preview/render.ts
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