remove compiler local var

pull/1/head
yann300 6 years ago
parent aadf49feda
commit c5c9618f5f
  1. 11
      src/app.js

@ -389,10 +389,9 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
// ----------------- Compiler ----------------- // ----------------- Compiler -----------------
self._components.compiler = new Compiler((url, cb) => self.importFileCb(url, cb)) self._components.compiler = new Compiler((url, cb) => self.importFileCb(url, cb))
var compiler = self._components.compiler registry.put({api: self._components.compiler, name: 'compiler'})
registry.put({api: compiler, name: 'compiler'})
var offsetToLineColumnConverter = new OffsetToLineColumnConverter(compiler.event) var offsetToLineColumnConverter = new OffsetToLineColumnConverter(self._components.compiler.event)
registry.put({api: offsetToLineColumnConverter, name: 'offsettolinecolumnconverter'}) registry.put({api: offsetToLineColumnConverter, name: 'offsettolinecolumnconverter'})
// ----------------- UniversalDApp ----------------- // ----------------- UniversalDApp -----------------
@ -409,8 +408,8 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
var transactionReceiptResolver = new TransactionReceiptResolver() var transactionReceiptResolver = new TransactionReceiptResolver()
var compiledContracts = function () { var compiledContracts = function () {
if (compiler.lastCompilationResult && compiler.lastCompilationResult.data) { if (self._components.compiler.lastCompilationResult && self._components.compiler.lastCompilationResult.data) {
return compiler.lastCompilationResult.data.contracts return self._components.compiler.lastCompilationResult.data.contracts
} }
return null return null
} }
@ -551,7 +550,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
var queryParams = new QueryParams() var queryParams = new QueryParams()
// check init query parameters from the URL once the compiler is loaded // check init query parameters from the URL once the compiler is loaded
compiler.event.register('compilerLoaded', this, function (version) { self._components.compiler.event.register('compilerLoaded', this, function (version) {
previousInput = '' previousInput = ''
self.runCompiler() self.runCompiler()

Loading…
Cancel
Save