From 83e3c14a0d2b1baf5816653eb9c8b2a884cac835 Mon Sep 17 00:00:00 2001 From: Vitaly Turovsky Date: Mon, 22 Jul 2024 12:08:42 +0300 Subject: [PATCH] fix: always use values! --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 91ea848..85716aa 100644 --- a/index.js +++ b/index.js @@ -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') { @@ -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 }