adopted-ember-addons / adopted-ember-addons/ember-sortable
drag test helper division by 0
Aperta
- Lingua principale
- TypeScript
- Stelle
- 299
- Fork
- 159
- Merge medio
- 4g 6h
- PR unite (30g)
- 4
Descrizione
**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
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.