Skip to content

fix: prevent 'undefined' from appearing as text in issue descriptions#94

Closed
srubin wants to merge 3 commits into
mainfrom
cursor/fix-catalogfile-undefined-72ee
Closed

fix: prevent 'undefined' from appearing as text in issue descriptions#94
srubin wants to merge 3 commits into
mainfrom
cursor/fix-catalogfile-undefined-72ee

Conversation

@srubin

@srubin srubin commented Jul 6, 2026

Copy link
Copy Markdown

TL;DR

Fixes a bug where the literal string "undefined" appeared in Linear and GitHub issue descriptions when a dependency provider had supportsCatalog=true but no catalogFile was set. Now correctly outputs an empty string instead.

Why

When generating issue descriptions, Handlebars was configured with a custom escapeExpression function to disable HTML escaping (since the output is Markdown). However, this override didn't handle null/undefined values properly, causing Handlebars to output the literal string "undefined" instead of an empty string.

This manifested in Linear issues like BIX-8345 where the "How to Update" section showed:

Edit `undefined`:

instead of an empty string when catalogFile was missing.

Code changes

  • Updated escapeExpression in both src/linear/issueDescriptions.ts and src/github-issues/issueDescriptions.ts to handle null/undefined values by returning an empty string
  • Added test cases in both test suites to verify that undefined catalogFile values don't output the string "undefined"

Testing

  • All existing tests pass (873 tests)
  • Added new test cases that specifically verify undefined catalogFile doesn't output "undefined" text
  • Verified with typecheck and lint

Related: Linear issue BIX-8345


Fun fact: This bug was as elusive as a duck hiding in tall reeds. Now flushed out and fixed! 🦆

Linear Issue: BIX-8345

Open in Web Open in Cursor 

cursoragent and others added 3 commits July 6, 2026 17:47
When catalogFile is undefined, Handlebars was outputting the literal
string 'undefined' instead of an empty string. This occurred because
the custom escapeExpression override to disable HTML escaping didn't
handle null/undefined values properly.

The fix updates escapeExpression in both Linear and GitHub issue
description modules to return an empty string for null/undefined
values, preventing 'undefined' from appearing in generated issues.

Fixes issue where catalog file path showed as 'undefined' when
a provider has supportsCatalog=true but catalogFile is missing.

Co-authored-by: Steve Rubin <srubin@users.noreply.github.com>
Co-authored-by: Steve Rubin <srubin@users.noreply.github.com>
Co-authored-by: Steve Rubin <srubin@users.noreply.github.com>
@srubin srubin closed this Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants