aboutsummaryrefslogtreecommitdiff
path: root/node_modules/pako/lib/utils/common.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/pako/lib/utils/common.js')
-rw-r--r--node_modules/pako/lib/utils/common.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/node_modules/pako/lib/utils/common.js b/node_modules/pako/lib/utils/common.js
index 1e159fecb..58be4beb4 100644
--- a/node_modules/pako/lib/utils/common.js
+++ b/node_modules/pako/lib/utils/common.js
@@ -5,6 +5,9 @@ var TYPED_OK = (typeof Uint8Array !== 'undefined') &&
(typeof Uint16Array !== 'undefined') &&
(typeof Int32Array !== 'undefined');
+function _has(obj, key) {
+ return Object.prototype.hasOwnProperty.call(obj, key);
+}
exports.assign = function (obj /*from1, from2, from3, ...*/) {
var sources = Array.prototype.slice.call(arguments, 1);
@@ -17,7 +20,7 @@ exports.assign = function (obj /*from1, from2, from3, ...*/) {
}
for (var p in source) {
- if (source.hasOwnProperty(p)) {
+ if (_has(source, p)) {
obj[p] = source[p];
}
}