Skip to content

Commit 0bd5c65

Browse files
committed
Use parseInt on phaseInterval cookie value
1 parent 65a9649 commit 0bd5c65

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

webapp/scripts/preview/requestList.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -537,9 +537,11 @@ RequestList.prototype = domplate(
537537
this.phases = [];
538538

539539
// The phase interval is customizable through a cookie.
540-
var phaseInterval = Cookies.getCookie("phaseInterval");
541-
if (!phaseInterval)
540+
// parseInt(undefined, null, non-numeric string) === NaN
541+
var phaseInterval = parseInt(Cookies.getCookie("phaseInterval"));
542+
if (isNaN(phaseInterval)) {
542543
phaseInterval = 4000;
544+
}
543545

544546
var phase = null;
545547

0 commit comments

Comments
 (0)