mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 21:31:04 +08:00
FIX: Infinite loop when poll step is zero (#5380)
* Fix infinite loop when poll step is zero * Add test for step minimum and for breaking test * Remove trailing spaces (eslint) * Remove extra space (eslint) * Removed test call .twice
This commit is contained in:
@ -133,6 +133,11 @@ const rule = {
|
||||
let max = parseInt(attrs["max"], 10);
|
||||
let step = parseInt(attrs["step"], 10);
|
||||
|
||||
// infinite loop if step < 1
|
||||
if (step < 1) {
|
||||
step = 1;
|
||||
}
|
||||
|
||||
let header = [];
|
||||
|
||||
let token = new state.Token('poll_open', 'div', 1);
|
||||
|
Reference in New Issue
Block a user