adopted-ember-addons / adopted-ember-addons/ember-pikaday
This querySelector is wrong formated and raises a DOMException
- 主要语言
- JavaScript
- 星标
- 156
- 派生
- 164
- PR 合并指标
- 30 天内没有已合并 PR
描述
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`
```
贡献指南
调研方向
Start at addon/helpers/pikaday.js line 40 and inspect the selector passed to document.querySelector. Reproduce the day=5 case, then verify that the selector no longer raises a DOMException and targets the intended button.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript
- 领域
- frontend
- Issue 类型
- 缺陷
- 难度
- 1/5
- 预计耗时
- 1 小时以内
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 55/100