diff --git a/scripts/check-no-t-shadow.sh b/scripts/check-no-t-shadow.sh index 59b05eb7f..fcddea8fc 100644 --- a/scripts/check-no-t-shadow.sh +++ b/scripts/check-no-t-shadow.sh @@ -24,10 +24,10 @@ check_pattern "template each-loop shadowing (as t)" '\{#each[^\n]* as t\b' # Dangerous callbacks in files using $t(...). while IFS= read -r file; do - if rg -q '\b(map|forEach|filter|find|some|every|reduce)\(\s*t\s*=>' "${file}"; then + if rg -q '\b(map|forEach|filter|find|some|every|reduce)\(\s*t\s*=>|\b(map|forEach|filter|find|some|every|reduce)\(\s*\([^)]*,\s*t\s*\)\s*=>' "${file}"; then echo echo "Found callback shadowing in file using \$t(...): ${file}" - rg -n '\b(map|forEach|filter|find|some|every|reduce)\(\s*t\s*=>' "${file}" + rg -n '\b(map|forEach|filter|find|some|every|reduce)\(\s*t\s*=>|\b(map|forEach|filter|find|some|every|reduce)\(\s*\([^)]*,\s*t\s*\)\s*=>' "${file}" had_issues=1 fi done < <(rg -l --glob '*.svelte' '\$t\(' "${SRC_DIR}") diff --git a/src/lib/components/views/PlaylistDetailView.svelte b/src/lib/components/views/PlaylistDetailView.svelte index 0ffe0cb98..510831701 100644 --- a/src/lib/components/views/PlaylistDetailView.svelte +++ b/src/lib/components/views/PlaylistDetailView.svelte @@ -509,7 +509,7 @@ })); // Update duration - playlist.duration = qobuzTracks.reduce((sum, t) => sum + t.duration, 0); + playlist.duration = qobuzTracks.reduce((sum, track) => sum + track.duration, 0); } catch (err) { console.error('Failed to load Qobuz tracks for pending playlist:', err); tracks = [];