Skip to content

Commit

Permalink
fix: always use values!
Browse files Browse the repository at this point in the history
  • Loading branch information
zardoy committed Jul 22, 2024
1 parent 86dab0e commit 83e3c14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ function provider (registry, { Biome, version }) {
}

function parseValue (value, state) {
if (state.type === 'enum') {
if (state.type === 'enum' || state.values) {
return state.values.indexOf(value)
}
if (state.type === 'bool') {
Expand All @@ -384,7 +384,7 @@ function provider (registry, { Biome, version }) {
}

function propValue (state, value) {
if (state.type === 'enum') return state.values[value]
if (state.type === 'enum' || state.values) return state.values[value]
if (state.type === 'bool') return !value
return value
}
Expand Down

0 comments on commit 83e3c14

Please sign in to comment.