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 00888bc commit 54fad6bCopy full SHA for 54fad6b
src/helpers/utils.ts
@@ -92,16 +92,10 @@ export function hasStrategyOverride(strategies: any[]) {
92
}
93
94
export function validateChoices({ type, choices }): boolean {
95
- if (type && choices.length > 0) {
96
- switch (type) {
97
- case 'basic':
98
- return choices.length === 3;
99
- default:
100
- return true;
101
- }
102
- } else {
103
- return false;
104
+ if (!type || !choices?.length) return false;
+ if (type === 'basic') return choices.length === 2 || choices.length === 3;
+
+ return true;
105
106
107
export function getIp(req) {
0 commit comments