From d27bd2b912d630fa0a475a2ddc70cb5ee884278a Mon Sep 17 00:00:00 2001 From: David Dias Date: Mon, 27 Mar 2017 15:43:08 +0100 Subject: [PATCH] cr --- src/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index 27ad69d4..3719d9e7 100644 --- a/src/index.js +++ b/src/index.js @@ -142,13 +142,13 @@ class Node extends EventEmitter { } ping (peer, callback) { - assert(this.isOn, OFFLINE_ERROR_MESSAGE) + assert(this.isOn(), OFFLINE_ERROR_MESSAGE) const peerInfo = this._getPeerInfo(peer) callback(null, new Ping(this.swarm, peerInfo)) } dial (peer, protocol, callback) { - assert(this.isOnline, OFFLINE_ERROR_MESSAGE) + assert(this.isOn(), OFFLINE_ERROR_MESSAGE) const peerInfo = this._getPeerInfo(peer) if (typeof protocol === 'function') { @@ -166,7 +166,7 @@ class Node extends EventEmitter { } hangUp (peer, callback) { - assert(this.isOnline, OFFLINE_ERROR_MESSAGE) + assert(this.isOn(), OFFLINE_ERROR_MESSAGE) const peerInfo = this._getPeerInfo(peer) this.peerBook.removeByB58String(peerInfo.id.toB58String())