Skip to content

Commit 22516fe

Browse files
committed
improvement(latex): reject whitespace-only package names at the block boundary
1 parent da18c79 commit 22516fe

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

apps/sim/blocks/blocks/latex.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,11 @@ Return ONLY the JSON array - no explanations, no markdown, no extra text.`,
164164
}
165165

166166
if (operation === 'latex_get_package') {
167-
return { name: packageName }
167+
const effectivePackageName = typeof packageName === 'string' ? packageName.trim() : ''
168+
if (!effectivePackageName) {
169+
throw new Error('Package name is required.')
170+
}
171+
return { name: effectivePackageName }
168172
}
169173

170174
if (operation === 'latex_list_fonts') {

0 commit comments

Comments
 (0)