Skip to content

Commit

Permalink
Merge pull request #142 from gitgrimbo/issue-124
Browse files Browse the repository at this point in the history
Use parseInt on phaseInterval cookie value
  • Loading branch information
gitgrimbo committed Jan 12, 2019
2 parents 65a9649 + 0bd5c65 commit 579969c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions webapp/scripts/preview/requestList.js
Expand Up @@ -537,9 +537,11 @@ RequestList.prototype = domplate(
this.phases = [];

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

var phase = null;

Expand Down

0 comments on commit 579969c

Please sign in to comment.