Skip to content

Commit 7c56ceb

Browse files
authored
Use Object.hasOwn for property check
1 parent 1cdf23f commit 7c56ceb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎Sprint-2/implement/contains.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ function contains(obj, property) {
22
if (obj === null || typeof obj !== "object" || Array.isArray(obj)) {
33
return false;
44
}
5-
return property in obj;
5+
return Object.hasOwn(obj, property);
66
}
77

88
module.exports = contains;

0 commit comments

Comments
 (0)