From 4e01bcfbb7e0661a42952b47d5e7c4e6ca8d7a92 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Tue, 24 May 2016 18:58:43 +0100 Subject: [PATCH] Support import statements where path if './file.sol' Fixes https://github.com/chriseth/browser-solidity/issues/108 --- src/app.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app.js b/src/app.js index a7ea9351e7..58a2e5fd28 100644 --- a/src/app.js +++ b/src/app.js @@ -723,6 +723,9 @@ var run = function() { if (getFiles().indexOf(fileKey(m)) !== -1) { files[m] = window.localStorage[fileKey(m)]; reloop = true; + } else if (m.startsWith('./') && getFiles().indexOf(fileKey(m.slice(2))) !== -1) { + files[m] = window.localStorage[fileKey(m.slice(2))]; + reloop = true; } else if (m in cachedRemoteFiles) { files[m] = cachedRemoteFiles[m]; reloop = true;