fix(artist pin): esc() crashed on numeric Deezer id; move pin button to banner top-right

- esc() now coerces to string first (String(s ?? '')), so passing a number (e.g. the
  Deezer artist id in the pin picker) no longer throws 'replace is not a function'.
- The '⚙ Falscher Künstler?' button moved from under the fan count to the top-right
  of the artist banner (absolute, on the hero). SW cache -> ns-v75.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
HoneyandClaude Opus 4.8 committed 2026-08-13 00:16:14 +02:00
1 parent 02960cf886
commit 5f251d555f
3 files changed
+14 -15

No files matched your search

+3 -1
View File
@@ -36,7 +36,9 @@ export function md5(input) {
}
export function esc(s) {
return (s||'').replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/"/g,'&quot;');
// Coerce to string first — callers sometimes pass numbers (e.g. a Deezer artist id), which
// would throw on .replace. null/undefined → ''.
return String(s ?? '').replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/"/g,'&quot;');
}
export function formatDur(s) {