use last part of contract file rather than 1st

This commit is contained in:
Aakil Fernandes 2016-01-30 11:40:36 -05:00
parent d07ddaf1e8
commit 25a5898051
1 changed files with 2 additions and 1 deletions

View File

@ -74,7 +74,8 @@ Compiler.prototype.compile_serpent = function(contractFile) {
Compiler.prototype.compile = function(contractFile) { Compiler.prototype.compile = function(contractFile) {
var extension = contractFile.split('.')[1]; var contractFileParts = contractFile.split('.')[1]
,extension = contractFileParts[contractFileParts.length-1];
if (extension === 'sol') { if (extension === 'sol') {
return this.compile_solidity(contractFile); return this.compile_solidity(contractFile);