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

Fix bug with sender status #74

Merged
merged 1 commit into from
Dec 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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