Log a warning on an unknown input type

63b48b921189ad1d79784cd6340d25e8243eb1c4

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +4 -3Ignore whitespace
public/scripts/popup.js+4 -3
@@ -284,9 +284,7 @@ export class Popup {
284284 }
285285
286286 this.inputControls.appendChild(label);
287- }
287+ } else if (input.type === 'text') {
288-
289- if (input.type === 'text') {
290288 const label = document.createElement('label');
291289 label.classList.add('text_label', 'justifyCenter');
292290 label.setAttribute('for', input.id);
@@ -306,6 +304,9 @@ export class Popup {
306304 label.appendChild(inputElement);
307305
308306 this.inputControls.appendChild(label);
307+ } else {
308+ console.warn('Unknown custom input type. Only checkbox and text are supported.', input);
309+ return;
309310 }
310311 });
311312