Fix SyntaxError

Without the quotes in safari you get the following error: SyntaxError: The string did not match the expected pattern.
This commit is contained in:
Jacob Reid authored and GitHub committed 2021-01-05 14:49:20 -07:00
1 parent 17720d0188
commit 1e9be28d74
1 file changed
+1 -1
+1 -1
View File
@@ -147,7 +147,7 @@ function matchingLabels(el) {
let root = el.getRootNode();
// if there is an id on `el`, check for all labels with a matching `for` attribute
if (el.id) {
let matching = root.querySelectorAll(`label[for = ${el.id}]`);
let matching = root.querySelectorAll(`label[for = '${el.id}']`);
for (let i = 0; i < matching.length; i++) {
labels.push(/** @type {!HTMLLabelElement} */(matching[i]));
}