diff --git a/files/templates/comments.html b/files/templates/comments.html
index 9939e7f78..b75e244d0 100644
--- a/files/templates/comments.html
+++ b/files/templates/comments.html
@@ -895,9 +895,8 @@
const detectionDiv = document.querySelector('#detection');
const isAutoDark = getComputedStyle(detectionDiv).backgroundColor != 'rgb(255, 255, 255)';
if (!isAutoDark) {
- let element = document.getElementsByClassName('comment-section')
+ const element = document.getElementsByClassName('comment-section')[0]
if (element) {
- element = element[0];
let color = getComputedStyle(element).getPropertyValue('background-color');
color = 'rgba' + color.slice(3,-1) + ', 0.1)'