From cb0ac1e3caf10fad95d821b55939aa418266d51f Mon Sep 17 00:00:00 2001 From: Aakil Fernandes Date: Sat, 30 Jan 2016 11:40:36 -0500 Subject: [PATCH] use last part of contract file rather than 1st --- lib/compiler.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/compiler.js b/lib/compiler.js index 6c2866df9..146ecd5ad 100644 --- a/lib/compiler.js +++ b/lib/compiler.js @@ -89,7 +89,9 @@ Compiler.prototype.compile = function(contractFiles) { var solidity = [], serpent = []; for (var i = 0; i < contractFiles.length; i++) { - var extension = contractFiles[i].split('.')[1]; + var contractParts = contractFiles[i].split('.'), + extension = contractParts[contractParts.length-1] + if (extension === 'sol') { solidity.push(contractFiles[i]); }