We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a55dee7 + a392155 commit 70a1ea4Copy full SHA for 70a1ea4
src/data/listen-to-feature/playlist.ts
@@ -1,3 +1,5 @@
1
+import { normalizeSlug } from "@/lib/utils/url"
2
+
3
import ethAudio from "@/data/audio/eth/eth.mp3"
4
import smartContractsAudio from "@/data/audio/smart-contracts/smart-contracts.mp3"
5
import walletsAudio from "@/data/audio/wallets/wallets.mp3"
@@ -41,7 +43,9 @@ export const getPlaylistBySlug = (
41
43
index: number
42
44
} => {
45
for (const playlist of Object.values(listenToPlaylists)) {
- const index = playlist.findIndex((item) => item.slug === slug)
46
+ const index = playlist.findIndex(
47
+ (item) => normalizeSlug(item.slug) === normalizeSlug(slug)
48
+ )
49
if (index !== -1) {
50
return { playlist, index }
51
}
0 commit comments