Skip to content

fix: RanobeLib parseNovel crash - summary field changed to rich-text doc - #2130

Merged
rajarsheechatterjee merged 1 commit into
lnreader:masterfrom
Sma1lON:fix/ranobelib-summary-parsing
Apr 22, 2026
Merged

fix: RanobeLib parseNovel crash - summary field changed to rich-text doc#2130
rajarsheechatterjee merged 1 commit into
lnreader:masterfrom
Sma1lON:fix/ranobelib-summary-parsing

Conversation

@Sma1lON

@Sma1lON Sma1lON commented Apr 19, 2026

Copy link
Copy Markdown
Contributor

Checklist

  • Update version code if an existing plugin was modified
  • Test changes in Plugin Playground or the app
  • Reference related issues in the PR body (e.g. Closes #xyz)

The API now returns summary as a JSON doc object ({type:"doc",content:[...]})
instead of a plain string. Calling .trim() on the object threw
TypeError: data.summary.trim is not a function, crashing parseNovel entirely.

Fix by detecting the type: use .trim() for strings, jsonToHtml() for doc objects.
Also corrects the Branch.branch_id type from null to number|null.

@rajarsheechatterjee
rajarsheechatterjee merged commit e97519e into lnreader:master Apr 22, 2026
1 check passed
nofzo pushed a commit to nofzo/lnreader-plugins that referenced this pull request May 22, 2026
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jul 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants