1
0
mirror of https://github.com/tcgdex/cards-database.git synced 2025-08-04 05:11:58 +00:00

fix: error while compiling on Windows (#846)

This commit is contained in:
2025-08-01 14:50:54 +02:00
committed by GitHub
parent dc26879060
commit cfef533c75
5 changed files with 14 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
/* eslint-disable sort-keys */
import { exec } from 'child_process'
import pathLib from 'node:path'
import { Card, Set, SupportedLanguages, Types } from '../../../interfaces'
import { CardResume, Card as CardSingle } from '../../../meta/definitions/api'
import { getSet, setToSetSimple } from './setUtil'
@@ -145,7 +145,7 @@ export async function getCards(lang: SupportedLanguages, set?: Set): Promise<Arr
}
const list: Array<[string, Card]> = []
for (const path of cards) {
let items = path.split('/')
let items = path.split(pathLib.sep)
items = items.slice(items.length - 3)
// get the card id