mirror of https://github.com/embarklabs/embark.git
remove previous listener (for now)
This commit is contained in:
parent
b7fc3f9054
commit
ce781ab96e
|
@ -101,10 +101,12 @@ class CodeGenerator {
|
|||
self.buildWeb3JS(cb);
|
||||
});
|
||||
|
||||
this.events.setCommandHandler('code-generator:contract', (contractName, cb) => {
|
||||
this.events.removeListener('code-generator:contract', () => {
|
||||
self.events.setCommandHandler('code-generator:contract', (contractName, cb) => {
|
||||
let contract = self.contractsManager.contracts[contractName];
|
||||
self.buildContractJS(contractName, self.generateContractJSON(contractName, contract), cb);
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -27,9 +27,11 @@ class ContractsManager {
|
|||
});
|
||||
|
||||
const self = this;
|
||||
this.events.setCommandHandler('contracts:list', (cb) => {
|
||||
this.events.removeListener('contracts:list', () => {
|
||||
self.events.setCommandHandler('contracts:list', (cb) => {
|
||||
cb(self.listContracts());
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
build(done) {
|
||||
|
|
Loading…
Reference in New Issue