Skip to content

Commit

Permalink
Fix: eslint error
Browse files Browse the repository at this point in the history
error  Do not access Object.prototype method 'hasOwnProperty' from target object  no-prototype-builtins
  • Loading branch information
black7375 committed Oct 15, 2021
1 parent c650774 commit 08221cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ function getDefaultOptions(): RequiredByValueExcept<fontRangeOptionI, 'savePath'
}

function getOption(options: Partial<fontRangeOptionI>, key: keyof fontRangeOptionI, alterValue: ValueOf<fontRangeOptionI>) {
return options.hasOwnProperty(key)
return Object.prototype.hasOwnProperty.call(options, key)
? options[key]
: alterValue;
}
Expand Down

0 comments on commit 08221cf

Please sign in to comment.