mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-01 04:46:43 +08:00
fix(cli): validate import response messages array
This commit is contained in:
@@ -63,7 +63,7 @@ export const ImportCommand = cmd({
|
||||
|
||||
const data = await response.json()
|
||||
|
||||
if (!data.info || !data.messages || Object.keys(data.messages).length === 0) {
|
||||
if (!data.info || !data.messages || !Array.isArray(data.messages) || data.messages.length === 0) {
|
||||
process.stdout.write(`Share not found: ${id}`)
|
||||
process.stdout.write(EOL)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user