Skip to content

Commit b7736db

Browse files
committed
fix: use hasOwnProperty to avoid prototype
1 parent b2e1a81 commit b7736db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/getAttribute.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Element.prototype.getAttribute = function (name) {
2828
'$session_id': 'session_id'
2929
};
3030

31-
if (localKeys[value]) {
31+
if (localKeys.hasOwnProperty(value)) {
3232
let newValue = localStorage.getItem(localKeys[value]);
3333

3434
if (!attributes.has(localKeys[value])) {

0 commit comments

Comments
 (0)