Skip to content

Commit 807190d

Browse files
committed
fix(files): use imageIds.length guard instead of assetMap.size
1 parent b49c0f3 commit 807190d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • apps/sim/app/api/files/export/[id]

apps/sim/app/api/files/export/[id]/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export const GET = withRouteHandler(
122122
assetMap.set(imageId, { filename, buffer })
123123
}
124124

125-
if (assetMap.size === 0) {
125+
if (imageIds.length === 0) {
126126
const mdName = safeFilename(record.originalName)
127127
const mdBytes = Buffer.from(mdContent, 'utf-8')
128128
return new NextResponse(new Uint8Array(mdBytes), {

0 commit comments

Comments
 (0)