catch loaded

pull/5167/head
bunsenstraat 2 months ago
parent c4eabfca4f
commit dadf71ba45
  1. 7
      apps/remix-ide/src/app/tabs/script-runner-ui.tsx

@ -40,9 +40,9 @@ export class ScriptRunnerUIPlugin extends ViewPlugin {
url: 'http://localhost:3000?template=' + name
}
console.log('loadScriptRunner', newProfile)
try {
const plugin: IframePlugin = new IframePlugin(newProfile)
await this.engine.register(plugin)
await this.call('manager', 'activatePlugin', newProfile.name)
this.current = newProfile.name
this.currentTemplate = name
@ -50,6 +50,11 @@ export class ScriptRunnerUIPlugin extends ViewPlugin {
this.on(newProfile.name, 'info', this.log.bind(this))
this.on(newProfile.name, 'warn', this.log.bind(this))
this.on(newProfile.name, 'error', this.log.bind(this))
} catch (e) {
this.current = newProfile.name
this.currentTemplate = name
console.log('Already loaded')
}
}
async execute(script: string, filePath: string) {

Loading…
Cancel
Save