pi-interview 0.5.3 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/schema.ts +3 -0
package/package.json
CHANGED
package/schema.ts
CHANGED
|
@@ -311,6 +311,9 @@ export function validateQuestions(data: unknown): QuestionsFile {
|
|
|
311
311
|
const optionLabels = q.options?.map(getOptionLabel) ?? [];
|
|
312
312
|
|
|
313
313
|
if (q.type === "single") {
|
|
314
|
+
if (Array.isArray(q.recommended) && q.recommended.length === 1) {
|
|
315
|
+
q.recommended = q.recommended[0];
|
|
316
|
+
}
|
|
314
317
|
if (typeof q.recommended !== "string") {
|
|
315
318
|
throw new Error(`Question "${q.id}": recommended must be string for single-select`);
|
|
316
319
|
}
|