From 63b48b921189ad1d79784cd6340d25e8243eb1c4 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Wed, 30 Apr 2025 22:58:43 +0300 Subject: [PATCH] Log a warning on an unknown input type --- public/scripts/popup.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/public/scripts/popup.js b/public/scripts/popup.js index a41626740..3a1b03877 100644 --- a/public/scripts/popup.js +++ b/public/scripts/popup.js @@ -284,9 +284,7 @@ export class Popup { } this.inputControls.appendChild(label); - } - - if (input.type === 'text') { + } else if (input.type === 'text') { const label = document.createElement('label'); label.classList.add('text_label', 'justifyCenter'); label.setAttribute('for', input.id); @@ -306,6 +304,9 @@ export class Popup { label.appendChild(inputElement); this.inputControls.appendChild(label); + } else { + console.warn('Unknown custom input type. Only checkbox and text are supported.', input); + return; } });