Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use document.getElementById to check target exists
Because the string passed to `querySelector` is evaluated as a CSS selector, this can fail if the ID contains characters that have a special meaning in CSS, such as `.` or `[]` – the ID would need to be escaped for it to be evaluated correctly. Avoid this by using `document.getElementById` instead, so the ID is no longer evaluated as a selector. The downside is that we can't constrain the scope to the $module. However, we don't think this should cause any issues as the ID _should_ be unique within the document. This fixes the failing tests introduced in the previous commit.
- Loading branch information