Skip to content

Commit

Permalink
Permalog: always convert reason to string before escaping to html (#1…
Browse files Browse the repository at this point in the history
…6296)

https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent/reason

`reason read-only property is any JavaScript value or Object which provides the reason passed into Promise.reject()`

fix #16295

Co-authored-by: kraktus <[email protected]>
  • Loading branch information
kraktus and kraktus authored Oct 30, 2024
1 parent 77853e7 commit 60be989
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/common/src/permalog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function makeLog(): LichessLog {
log(`${terseHref()} - ${e.reason}`);
if (site.debug)
domDialog({
htmlText: escapeHtml(e.reason),
htmlText: escapeHtml(e.reason.toString()),
class: 'debug',
show: true,
});
Expand Down

0 comments on commit 60be989

Please sign in to comment.