Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Commit

Permalink
Merge pull request #100 from LiskHQ/99_fix-peer-dropdown
Browse files Browse the repository at this point in the history
Fix peer doesn't show the peer at first - Closes #99
  • Loading branch information
karmacoma authored Apr 6, 2017
2 parents 82e9a60 + d6c9b26 commit f22ae91
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/services/peers/peers.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,18 @@ app.factory('$peers', ($timeout, $cookies, $location, $q) => {
}

this.setPeerAPIObject(conf);
this.currentPeerConfig = conf;
if (!this.stack) {
this.stack = this.active.listPeers();
this.stack.localhost = [localhostConf, {
node: 'localhost',
port: 8000,
}];
this.peerByName = {};
Object.keys(this.stack).forEach((key) => {
this.stack[key].forEach(peer => this.peerByName[peer.node] = peer);
});
}
this.currentPeerConfig = this.peerByName[this.active.currentPeer];

this.check();
}
Expand Down

0 comments on commit f22ae91

Please sign in to comment.