adopted-ember-addons / adopted-ember-addons/ember-pikaday

This querySelector is wrong formated and raises a DOMException

Offen
#529 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
156
Forks
164
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

This code line creates a wrongly formated selector for document.querySelector and results into a DOMException

https://github.com/adopted-ember-addons/ember-pikaday/blob/19366ea66e9037fe9410c65369e9bb796a4b5ed6/addon/helpers/pikaday.js#L40

for example day=5 gives
```
'td[data-day="'5'"]:not(.is-outside-current-month) button}'
```
which is wrong in two places the last } is too much and encasing the day placeholder with ' also brakes the selector. The right code line could look like this
```
`td[data-day="${day}"]:not(.is-outside-current-month) button`
```

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.