Skip to content

Commit 5e40063

Browse files
committed
fix: hasOwnProperty not found
1 parent 2a8d3c6 commit 5e40063

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const cache = new Map();
1313
* @param {!Function|Object} value
1414
*/
1515
const method = module.exports = (obj, key, value) => {
16-
const hasOwnProperty = obj.hasOwnProperty(key);
16+
const hasOwnProperty = Object.prototype.hasOwnProperty.call(obj, key);
1717
mocks.push({
1818
obj,
1919
key,
@@ -39,7 +39,7 @@ const method = module.exports = (obj, key, value) => {
3939
configurable: true,
4040
enumerable: true,
4141
};
42-
42+
4343
if (value && (value.get || value.set)) {
4444
// Default to undefined
4545
descriptor.get = value.get;

0 commit comments

Comments
 (0)