We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8446d7f commit 7c732dcCopy full SHA for 7c732dc
src/plugin/components/fields/VSFButtonField/VSFButtonField.vue
@@ -317,7 +317,17 @@ const isActive = (val: string | number): boolean | undefined => {
317
return undefined;
318
}
319
320
- return value.value === val || (value.value as string[]).includes(val as string);
+ // If value.value is a number, compare directly.
321
+ if (typeof value.value === 'number') {
322
+ return value.value === val;
323
+ }
324
+
325
+ // If value.value is a string or an array of strings, handle both cases.
326
+ if (typeof value.value === 'string' || Array.isArray(value.value)) {
327
+ return (value.value as string[]).includes(val as string);
328
329
330
+ return undefined;
331
};
332
333
// ------------------------- Variants //
0 commit comments