Skip to content

Commit

Permalink
height: Improve naming of internal promise
Browse files Browse the repository at this point in the history
  • Loading branch information
davidyuk committed Oct 26, 2020
1 parent 8e872b4 commit 7915119
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions es/chain/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ async function tx (hash, info = true) {

async function height () {
try {
if (this.height_query_promise === undefined) {
this.height_query_promise = this.api.getCurrentKeyBlockHeight()
if (this._heightPromise === undefined) {
this._heightPromise = this.api.getCurrentKeyBlockHeight()
}
return (await this.height_query_promise).height
return (await this._heightPromise).height
} finally {
this.height_query_promise = undefined
this._heightPromise = undefined
}
}

Expand Down

0 comments on commit 7915119

Please sign in to comment.