Skip to content
This repository has been archived by the owner on Dec 10, 2020. It is now read-only.

Commit

Permalink
Fix bug with sender status
Browse files Browse the repository at this point in the history
  • Loading branch information
vpulim committed Dec 3, 2018
1 parent 0848e1e commit 043ff9b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/net/protocol/sender.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const EventEmitter = require('events')
class Sender extends EventEmitter {
constructor () {
super()
this._status = {}
this._status = null
}

get status () {
Expand Down
2 changes: 1 addition & 1 deletion test/net/protocol/sender.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { Sender } = require('../../../lib/net/protocol')
tape('[Sender]', t => {
t.test('should get/set status', t => {
const sender = new Sender()
t.deepEquals(sender.status, {}, 'empty status')
t.deepEquals(sender.status, null, 'empty status')
sender.status = {id: 1}
t.deepEquals(sender.status, {id: 1}, 'status correct')
t.end()
Expand Down

0 comments on commit 043ff9b

Please sign in to comment.