From 7dd4521eb06dd0292956576a98625a75aad310e1 Mon Sep 17 00:00:00 2001
From: Carl Worth <cworth@cworth.org>
Date: Fri, 9 Dec 2022 13:08:37 -0800
Subject: [PATCH] Add empty comments array when creating a new image

Otherwise things would just break.
---
 index.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/index.js b/index.js
index 49a8566..b0e7d7a 100644
--- a/index.js
+++ b/index.js
@@ -124,6 +124,7 @@ io.on('connection', (socket) => {
                 const images = JSON.parse(data);
                 images.forEach((image) => {
                     image.id = state.images.length;
+		    image.comments = [];
                     io.emit('image', image);
                     state.images.push(image);
                 });
-- 
2.45.2