Log a warning on an unknown input type
| @@ -284,9 +284,7 @@ export class Popup { | |||
| 284 | } | 284 | } |
| 285 | 285 | ||
| 286 | this.inputControls.appendChild(label); | 286 | this.inputControls.appendChild(label); |
| 287 | } | 287 | } else if (input.type === 'text') { |
| 288 | |||
| 289 | if (input.type === 'text') { | ||
| 290 | const label = document.createElement('label'); | 288 | const label = document.createElement('label'); |
| 291 | label.classList.add('text_label', 'justifyCenter'); | 289 | label.classList.add('text_label', 'justifyCenter'); |
| 292 | label.setAttribute('for', input.id); | 290 | label.setAttribute('for', input.id); |
| @@ -306,6 +304,9 @@ export class Popup { | |||
| 306 | label.appendChild(inputElement); | 304 | label.appendChild(inputElement); |
| 307 | 305 | ||
| 308 | this.inputControls.appendChild(label); | 306 | this.inputControls.appendChild(label); |
| 307 | } else { | ||
| 308 | console.warn('Unknown custom input type. Only checkbox and text are supported.', input); | ||
| 309 | return; | ||
| 309 | } | 310 | } |
| 310 | }); | 311 | }); |
| 311 | 312 | ||