From 9b56f2bea82df9bd04a9dfec6d3ab4b711630dbf Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 25 Aug 2016 15:17:32 +0200 Subject: [PATCH] bug fix --- src/app/compiler.js | 2 +- src/app/ui-helper.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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(); }