diff --git a/src/app/compiler.js b/src/app/compiler.js index 436e2bb1bb..de0e24a57d 100644 --- a/src/app/compiler.js +++ b/src/app/compiler.js @@ -52,7 +52,7 @@ function Compiler (editor, queryParams, handleGithubCall, updateFiles) { files[utils.fileNameFromKey(editor.getCacheFile())] = input; gatherImports(files, missingInputs, function (input, error) { if (input === null) { - this.event.trigger('compilationFinished', [false, error, editor.getValue()]); + self.event.trigger('compilationFinished', [false, [error], editor.getValue()]); } else { var optimize = queryParams.get().optimize; compileJSON(input, optimize ? 1 : 0); diff --git a/src/app/ui-helper.js b/src/app/ui-helper.js index 18704d0d02..9d0f62310a 100644 --- a/src/app/ui-helper.js +++ b/src/app/ui-helper.js @@ -152,7 +152,8 @@ module.exports = { details.append(assembly); } - button.click(function () { this.detailsOpen[contractName] = !this.detailsOpen[contractName]; details.toggle(); }); + var self = this; + button.click(function () { self.detailsOpen[contractName] = !self.detailsOpen[contractName]; details.toggle(); }); if (this.detailsOpen[contractName]) { details.show(); }