diff --git a/Public/grid.html b/Public/grid.html
index 723cd62..e1ea8d1 100644
--- a/Public/grid.html
+++ b/Public/grid.html
@@ -1926,6 +1926,7 @@
const numberOfCaps = 1875;
const numberOfRows = Math.ceil(1875 / 40);
const effectiveHeight = 50 - 6;
+ const elements = imageCanvas.getElementsByTagName("img");
var capPositions = Array.from(
{length: numberOfCaps},
@@ -1933,7 +1934,7 @@
);
function setCapImageAtPosition(capId, position) {
- imageCanvas.getElementsByTagName("img")[position].src = "thumbnails/" + `${capId}.jpg`.padStart(8, '0');
+ elements[position].src = "thumbnails/" + `${capId}.jpg`.padStart(8, '0');
capPositions[position] = capId;
}