Commit 9ae6db8
committed
Fix NaN handling in responseAdSlotCount
The function didn't validate that params.step and params.firstAdAfterNodes are
finite numbers. If they were NaN or Infinity, Math.max(1, NaN) would return NaN.
Added Number.isFinite() checks to default to safe values for invalid numbers.1 parent 7b65652 commit 9ae6db8
1 file changed
Lines changed: 4 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
| |||
0 commit comments