Skip to content

Commit

Permalink
Permalog: always convert reason to string before escaping to html
Browse files Browse the repository at this point in the history
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 lichess-org#16295
  • Loading branch information
kraktus committed Oct 30, 2024
1 parent 77853e7 commit d5d291e
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 d5d291e

Please sign in to comment.