Skip to content

Commit

Permalink
remove hasownproperty call
Browse files Browse the repository at this point in the history
  • Loading branch information
gurgunday committed Oct 8, 2024
1 parent 0f56c6e commit daeae56
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ const domainValueRegExp =
const pathValueRegExp = /^[\u0020-\u003A\u003D-\u007E]*$/;

const __toString = Object.prototype.toString;
const __hasOwnProperty = Object.prototype.hasOwnProperty;

const NullObject = /* @__PURE__ */ (() => {
const C = function () {};
Expand Down Expand Up @@ -121,7 +120,7 @@ export function parse(
const key = str.slice(keyStartIdx, keyEndIdx);

// only assign once
if (!__hasOwnProperty.call(obj, key)) {
if (obj[key] === undefined) {
let valStartIdx = startIndex(str, eqIdx + 1, endIdx);
let valEndIdx = endIndex(str, endIdx, valStartIdx);

Expand Down

0 comments on commit daeae56

Please sign in to comment.