Skip to content

Commit

Permalink
refactor(index): use constant comparison order
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs committed Feb 22, 2024
1 parent 598315a commit 1267519
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function parseOptions(acceptedOptions, options, version) {
Object.keys(options).forEach((key) => {
if (Object.hasOwn(acceptedOptions, key)) {
// eslint-disable-next-line valid-typeof -- `type` is a string
if (typeof options[key] === acceptedOptions[key].type) {
if (acceptedOptions[key].type === typeof options[key]) {
// Skip boolean options if false
if (acceptedOptions[key].type === "boolean" && !options[key]) {
return;
Expand Down

0 comments on commit 1267519

Please sign in to comment.