Skip to content

Commit cde5077

Browse files
committed
fix: stringify blank file
1 parent f0f44b3 commit cde5077

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/downloadImages.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const effects = new Set([
2222

2323
async function updateFile(path, data) {
2424
// Create blank if not exists
25-
await fs.writeFile(path, Array.isArray(data) ? [] : {}, { flag: 'wx' });
25+
await fs.writeFile(path, JSON.stringify(Array.isArray(data) ? [] : {}), { flag: 'wx' });
2626

2727
// Load existing
2828
const file = await fs.readFile(path);

0 commit comments

Comments
 (0)