diff --git a/editor/extension.ts b/editor/extension.ts index aa508dc0..8656e7d4 100644 --- a/editor/extension.ts +++ b/editor/extension.ts @@ -13,15 +13,16 @@ namespace pxt.editor { }, name: data.meta.name }) }, { - id: "td", - canImport: data => data.meta.cloudId == "microbit.co.uk" && data.meta.editor == "touchdevelop", - importAsync: (project, data) => - project.createProjectAsync({ - filesOverride: { "main.blocks": "", "main.ts": " " }, - name: data.meta.name - }).then(() => project.convertTouchDevelopToTypeScriptAsync(data.source)) - .then(text => this.textEditor.overrideFile(text)) - }] + id: "td", + canImport: data => data.meta.cloudId == "microbit.co.uk" && data.meta.editor == "touchdevelop", + importAsync: (project, data) => + project.createProjectAsync({ + filesOverride: { "main.blocks": "", "main.ts": " " }, + name: data.meta.name + }) + .then(() => project.convertTouchDevelopToTypeScriptAsync(data.source)) + .then(text => project.overrideTypescriptFile(text)) + }] }; return Promise.resolve(res); }