提交 8e410489 编写于 作者: A Alex Dima

Use `require` instead of `self.require`

上级 1e0fbd2c
......@@ -295,6 +295,8 @@ export interface IForeignModuleFactory {
(ctx: IWorkerContext, createData: any): any;
}
declare var require;
/**
* @internal
*/
......@@ -501,8 +503,7 @@ export abstract class BaseEditorSimpleWorker {
return TPromise.as(methods);
}
return new TPromise<any>((c, e) => {
// Use the global require to be sure to get the global config
(<any>self).require([moduleId], (foreignModule: { create: IForeignModuleFactory }) => {
require([moduleId], (foreignModule: { create: IForeignModuleFactory }) => {
this._foreignModule = foreignModule.create(ctx, createData);
let methods: string[] = [];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册