diff options
| author | stonedDiscord <Tukz@gmx.de> | 2025-06-26 19:08:58 +0200 |
|---|---|---|
| committer | stonedDiscord <Tukz@gmx.de> | 2025-06-26 19:08:58 +0200 |
| commit | e4ec5ceedb03ae7a23c7d2d8d6ce51c814b3e9a8 (patch) | |
| tree | 49780722c28a6ed55ec85bbdef31239b66512a26 /webAO/client/isAudio.ts | |
| parent | 4e7ddc05458ecf10c9e4e713ec3429276672115e (diff) | |
isaudio edge cases
Diffstat (limited to 'webAO/client/isAudio.ts')
| -rw-r--r-- | webAO/client/isAudio.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/webAO/client/isAudio.ts b/webAO/client/isAudio.ts index 52e53a1..032b68f 100644 --- a/webAO/client/isAudio.ts +++ b/webAO/client/isAudio.ts @@ -1,4 +1,7 @@ export const isAudio = (trackname: string) => { + if (!trackname || typeof trackname !== 'string') { + return false; + } const audioEndings = [".wav", ".mp3", ".ogg", ".opus"]; return ( audioEndings.filter((ending) => trackname.endsWith(ending)).length === 1 |
