Skip to content

Commit 747d7e0

Browse files
committed
fix: guard against null prototype error
1 parent 29a62a6 commit 747d7e0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/binary.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function _deconstructPacket(data, buffers) {
3333
} else if (typeof data === "object" && !(data instanceof Date)) {
3434
const newData = {};
3535
for (const key in data) {
36-
if (data.hasOwnProperty(key)) {
36+
if (Object.prototype.hasOwnProperty.call(data, key)) {
3737
newData[key] = _deconstructPacket(data[key], buffers);
3838
}
3939
}

0 commit comments

Comments
 (0)