Skip to content

Commit 1fd0842

Browse files
committed
fix: wait for read file to occur exception
1 parent 91681a3 commit 1fd0842

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/structures/Cache.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default class CacheManager {
2727
try {
2828
this.logger.info(`Using cache ${hash}`)
2929

30-
return readFile(join(__dirname, `../../cache/${hash}.svg`), 'utf-8')
30+
return await readFile(join(__dirname, `../../cache/${hash}.svg`), 'utf-8')
3131
} catch (e) {
3232
const svg = await generate(data)
3333
this.cache(svg, hash)

0 commit comments

Comments
 (0)