Skip to content

Commit

Permalink
adding empty string as client pub
Browse files Browse the repository at this point in the history
  • Loading branch information
nucleardreamer committed Mar 16, 2017
1 parent 8575a08 commit 4614e9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/websocket/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,12 @@ class WebSocketClient extends EventEmitter2 {
/**
* @description pub Publish a payload to a given event namespace
* @param {String} namespace - delimited namespace to publish on
* @param {Number|String|Object} payload - the payload object to publish
* @param {Number|String|Object} payload='' - the payload object to publish
* @param {Function} [callback] - optional callback for message sent
* @returns {WebSocketClient}
* @memberof WebSocketClient
*/
pub (namespace, payload, callback = function () {}) {
pub (namespace, payload = '', callback = function () {}) {
if (this._isBlacklisted(namespace)) {
callback(new Error(`Cannot publish on blacklisted namespace: ${namespace}`))
return this
Expand Down

0 comments on commit 4614e9d

Please sign in to comment.