adopted-ember-addons / adopted-ember-addons/ember-sortable
drag test helper division by 0
未關閉
- 主要語言
- TypeScript
- 星號
- 299
- 分支
- 159
- 平均合併
- 4 天 6 小時
- 30 天內合併 PR
- 4
描述
**Describe the bug**
drag test helper can produce a division by 0, which causes an error for `triggerEvent` because the value is `Infinity`
**To Reproduce**
Reproduction unsure, but only seems to happen in headless test mode.
**Expected behavior**
Avoid the division by 0
**Additional context**
The offending line
```
const scale = clientHeight / (rect.bottom - rect.top);
```
https://github.com/adopted-ember-addons/ember-sortable/blob/master/addon/src/test-support/helpers/drag.js#L61
貢獻指南
評估
這個 Issue 還沒有評估資料。