Skip to content

Conversation

@AmmarKazi
Copy link

Description

This PR addresses a regression where the Markdown previewer crashes with Failed to render: marked(): input parameter is of type [object Number] when encountering non-string data (e.g., numeric descriptions).

This is a follow-up to the stability improvements started in the search bar fix #9392.

The Fix

I updated MarkdownPreview in markdown-preview.tsx to explicitly cast the input to a string before passing it to the marked library.

  • Change: marked(String(markdown || ''))
  • Result: Numeric values (like 12345) are now correctly rendered as text instead of throwing a library type error. Null and Undefined values will be empty strings.

Verification

  1. Imported a request with a numeric description (12345).
  2. Opened the Preview/Docs tab.
  3. Confirmed that the red error message is gone and the number renders correctly as a string.

Closes #9453

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants