fix src map retrieval

pull/7/head
yann300 8 years ago
parent a29aba7125
commit 82bc839c7f
  1. 2
      src/code/sourceLocationTracker.js

@ -67,7 +67,7 @@ function getSourceMap (address, code, contracts) {
var isCreation = helper.isContractCreation(address) var isCreation = helper.isContractCreation(address)
var byteProp = isCreation ? 'bytecode' : 'runtimeBytecode' var byteProp = isCreation ? 'bytecode' : 'runtimeBytecode'
for (var k in contracts) { for (var k in contracts) {
if ('0x' + contracts[k][byteProp] === code) { if (code.indexOf('0x' + contracts[k][byteProp]) === 0) {
return isCreation ? contracts[k].srcmap : srcmapRuntime(contracts[k]) return isCreation ? contracts[k].srcmap : srcmapRuntime(contracts[k])
} }
} }

Loading…
Cancel
Save