Skip to content

Commit 69cc5c1

Browse files
author
David Hasani
committed
handle missing targetVersion better
1 parent db29c77 commit 69cc5c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/core/src/codewhisperer/service/transformByQ/transformFileHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ function validateItem(item: any, validOriginTypes: string[] = ['FIRST_PARTY', 'T
162162
getLogger().info(`CodeTransformation: Invalid originType: ${item.originType}`)
163163
return `Invalid originType: \`${item.originType}\`. Must be either \`FIRST_PARTY\` or \`THIRD_PARTY\``
164164
}
165-
if (!item.targetVersion.trim()) {
165+
if (!item.targetVersion?.trim()) {
166166
getLogger().info(`CodeTransformation: Missing targetVersion in: ${item.identifier}`)
167167
return `Missing \`targetVersion\` in: \`${item.identifier}\``
168168
}

0 commit comments

Comments
 (0)