fix: ensure Scryfall set cache directory exists and update service worker revision for index.html.
All checks were successful
Build and Deploy / build (push) Successful in 2m3s
All checks were successful
Build and Deploy / build (push) Successful in 2m3s
This commit is contained in:
@@ -267,6 +267,9 @@ export class ScryfallService {
|
||||
|
||||
// Save Set Cache
|
||||
if (allCards.length > 0) {
|
||||
if (!fs.existsSync(path.dirname(setCachePath))) {
|
||||
fs.mkdirSync(path.dirname(setCachePath), { recursive: true });
|
||||
}
|
||||
fs.writeFileSync(setCachePath, JSON.stringify(allCards, null, 2));
|
||||
|
||||
// Smartly save individuals: only if missing from cache
|
||||
|
||||
Reference in New Issue
Block a user