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:
1 parent
02960cf886
commit
5f251d555f
3 files changed
+14
-15
No files matched your search
+3
-1
@@ -36,7 +36,9 @@ export function md5(input) {
|
||||
}
|
||||
|
||||
export function esc(s) {
|
||||
return (s||'').replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>').replace(/"/g,'"');
|
||||
// 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,'&').replace(/</g,'<').replace(/>/g,'>').replace(/"/g,'"');
|
||||
}
|
||||
|
||||
export function formatDur(s) {
|
||||
|
||||
Reference in new issue
Block a user