From c6c811b10eb47b422468fc18461da0227337eb11 Mon Sep 17 00:00:00 2001 From: dewanakl Date: Tue, 31 Dec 2024 23:21:25 +0700 Subject: [PATCH] refactor: improve readability --- js/comment.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/comment.js b/js/comment.js index ee3a6ab..11896c4 100644 --- a/js/comment.js +++ b/js/comment.js @@ -15,7 +15,11 @@ export const comment = (() => { let tracker = null; let showHide = null; - const changeButton = (id, disabled) => document.querySelector(`[data-button-action="${id}"]`).childNodes.forEach((e) => e.disabled = disabled); + const changeButton = (id, disabled) => { + document.querySelector(`[data-button-action="${id}"]`).childNodes.forEach((e) => { + e.disabled = disabled; + }); + }; const remove = async (button) => { if (!confirm('Are you sure?')) {