Skip to content

Commit

Permalink
Avoid using deprecated Buffer constructor
Browse files Browse the repository at this point in the history
safe-buffer is already used and provides Buffer.alloc polyfill, so
just use Buffer.alloc directly to avoid hitting deprecated API.

Refs:
https://nodejs.org/api/deprecations.html#deprecations_dep0005_buffer_constructor
  • Loading branch information
ChALkeR committed Mar 2, 2018
1 parent 0438165 commit 2c31bcc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/spdy-transport/stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ Stream.prototype._onFinish = function _onFinish () {
id: this.id,
priority: state.priority.getPriority(),
fin: true,
data: new Buffer(0)
data: Buffer.alloc(0)
})
}

Expand Down

0 comments on commit 2c31bcc

Please sign in to comment.