We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5f2c871 commit dac97ffCopy full SHA for dac97ff
1 file changed
src/services/revalidate.ts
@@ -1,4 +1,5 @@
1
import axios from 'axios'
2
+import fs from 'fs'
3
import { singleton } from 'tsyringe'
4
import { writeFile } from '../utils/helpers.js'
5
@@ -50,6 +51,11 @@ export default class RevalidateService {
50
51
}
52
53
async revalidateRandomWiki(url: string, path: string) {
54
+ if (!fs.existsSync(path)) {
55
+ console.log(`⚠️ Wiki links file not found: ${path}, skipping revalidation`)
56
+ return
57
+ }
58
+
59
const { links } = await import(path)
60
61
if (links.length !== 0) {
0 commit comments