1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #7075: Wrap label selectors in quotes to ensure IDs with spaces are properly selected

This commit is contained in:
thatmattlove
2021-08-30 17:48:33 -07:00
parent bf05bc2986
commit db2993035d
4 changed files with 5 additions and 5 deletions

View File

@ -4,7 +4,7 @@ import { getElements } from '../util';
export function initStaticSelect(): void {
for (const select of getElements<HTMLSelectElement>('.netbox-static-select')) {
if (select !== null) {
const label = document.querySelector(`label[for=${select.id}]`) as HTMLLabelElement;
const label = document.querySelector(`label[for="${select.id}"]`) as HTMLLabelElement;
let placeholder;
if (label !== null) {