diff --git a/cli/magic-create.ts b/cli/magic-create.ts index 09d1b9bcc..36b7ed215 100644 --- a/cli/magic-create.ts +++ b/cli/magic-create.ts @@ -200,7 +200,7 @@ async function processCreateOptions(options: any): Promise { const answers: any = await enquirer.prompt(questions); const kendraExternal = []; let newKendra = answers.enableRag && answers.kendra; - const existingKendraIndices = Array.from(options.kendraExternal); + const existingKendraIndices = Array.from(options.kendraExternal || []); while (newKendra === true) { let existingIndex: any = existingKendraIndices.pop(); console.log(