This commit is contained in:
@@ -38,7 +38,7 @@ const answerFiles = import.meta.globEager('./Data/*/*/answers/*.mp3') as Record<
|
||||
const getParts = (path: string) => {
|
||||
const normalized = path.replace(/\\/g, '/')
|
||||
const parts = normalized.split('/')
|
||||
const dataIndex = parts.indexOf('Data')
|
||||
const dataIndex = parts.findIndex((part) => part.toLowerCase() === 'data')
|
||||
if (dataIndex === -1) return null
|
||||
const game = parts[dataIndex + 1]
|
||||
const category = parts[dataIndex + 2]
|
||||
|
||||
Reference in New Issue
Block a user