Skip to content

Commit 31d8018

Browse files
committed
Moves write to within iife
1 parent 0b77c6c commit 31d8018

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

2018/17/visualization.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ const hasBinary = (bin) => {
4040
const grid = new Grid(input);
4141
const ground = new Ground({ grid });
4242

43-
fs.writeFileSync('grid.txt', ground.toString());
4443
(async () => {
4544
let empty_grid_image_buffer = await ground.toImage({
4645
callback: async ({ image }) => {
4746
return await image.getBufferAsync(Jimp.MIME_PNG);
4847
},
4948
});
5049
fs.writeFileSync('grid.png', empty_grid_image_buffer);
50+
fs.writeFileSync('grid.txt', ground.toString());
5151

5252
if (hasBinary('ffmpeg')) {
5353
await ground.fill(true);

0 commit comments

Comments
 (0)