From 419b4aa62ddbdd8679d22953e3db45d090ecc2ad Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 30 Jan 2018 12:25:33 +0100 Subject: [PATCH] fix ballot.sol load --- src/app.js | 12 ++++-------- src/app/files/fileManager.js | 2 -- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/app.js b/src/app.js index 308ebe6482..b7fb76bc6b 100644 --- a/src/app.js +++ b/src/app.js @@ -514,14 +514,10 @@ Please make a backup of your contracts and start using http://remix.ethereum.org filePanel.event.register('resize', delta => self._adjustLayout('left', delta)) - setTimeout(function initOpenFile () { - var previouslyOpenedFile = config.get('currentFile') || 'browser/ballot.sol' - config.set('currentFile', null) - filesProviders['browser'].get(previouslyOpenedFile, (error, content) => { - if (!error && content) fileManager.switchFile(previouslyOpenedFile) - else fileManager.switchFile('browser/ballot.sol') - }) - }, 0) + var previouslyOpenedFile = config.get('currentFile') + filesProviders['browser'].get(previouslyOpenedFile, (error, content) => { + if (!error && content) fileManager.switchFile(previouslyOpenedFile) + }) // ----------------- Renderer ----------------- var rendererAPI = { diff --git a/src/app/files/fileManager.js b/src/app/files/fileManager.js index 8acaaa2a01..33c99accc5 100644 --- a/src/app/files/fileManager.js +++ b/src/app/files/fileManager.js @@ -135,8 +135,6 @@ class FileManager { } else _switchFile(file) function _switchFile (file) { self.saveCurrentFile() - var currentFile = self.opt.config.get('currentFile') - if (file === currentFile) return self.refreshTabs(file) self.fileProviderOf(file).get(file, (error, content) => { if (error) {