resolve with compilation error instead of rejecting

pull/11/head
yann300 4 years ago committed by ioedeveloper
parent 64aea4f721
commit 635f3bb7c1
  1. 2
      apps/remix-ide/src/app/compiler/compiler-helpers.js

@ -12,7 +12,7 @@ export const compile = async (compilationTargets, settings) => {
compiler.set('language', settings.language)
compiler.loadVersion(canUseWorker(settings.version), urlFromVersion(settings.version))
compiler.event.register('compilationFinished', (success, compilationData, source) => {
if (!success) return reject(compilationData)
if (!success) return resolve({ compilationData, source })
resolve(new CompilerAbstract(settings.version, compilationData, source))
})
compiler.event.register('compilerLoaded', _ => compiler.compile(compilationTargets, ''))

Loading…
Cancel
Save