From 0bd5c65e0a7736512aaf2d0d63d5dc12f5344004 Mon Sep 17 00:00:00 2001 From: gitgrimbo Date: Sat, 12 Jan 2019 17:12:02 +0000 Subject: [PATCH] Use parseInt on phaseInterval cookie value --- webapp/scripts/preview/requestList.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/webapp/scripts/preview/requestList.js b/webapp/scripts/preview/requestList.js index 43626f8f..4bbb1d6a 100644 --- a/webapp/scripts/preview/requestList.js +++ b/webapp/scripts/preview/requestList.js @@ -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;