Skip to content

Commit

Permalink
Merge pull request #571 from fnlctrl/patch-2
Browse files Browse the repository at this point in the history
Fix directly using Buffer instead of util.Buffer
  • Loading branch information
dcodeIO authored Dec 18, 2016
2 parents bfac0ea + 6c2415d commit ccc5de1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/field.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ FieldPrototype.jsonConvert = function(value, options) {
if (options.bytes === Array)
return Array.prototype.slice.call(value);
if (options.bytes === util.Buffer && !util.Buffer.isBuffer(value))
return util.Buffer.from ? util.Buffer.from(value) : new Buffer(value);
return util.Buffer.from ? util.Buffer.from(value) : new util.Buffer(value);
}
}
return value;
Expand Down

0 comments on commit ccc5de1

Please sign in to comment.