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.from polyfill, so
just use Buffer.from 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 c52c8d1
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 c52c8d1

Please sign in to comment.