mirror of
https://github.com/prymitive/karma
synced 2026-05-05 03:16:51 +00:00
Merge pull request #132 from cloudflare/refresh-fix
Refresh interval fixes
This commit is contained in:
@@ -37,6 +37,7 @@ var ConfigOption = (function() {
|
||||
var q = QueryString.Parse();
|
||||
if (q[this.QueryParam] !== undefined) {
|
||||
this.Set(q[this.QueryParam]);
|
||||
val = q[this.QueryParam];
|
||||
}
|
||||
|
||||
if (currentVal != val) {
|
||||
|
||||
@@ -80,14 +80,18 @@ var Unsee = (function() {
|
||||
|
||||
var setRefreshRate = function(seconds) {
|
||||
var rate = parseInt(seconds);
|
||||
if (isNaN(rate)) {
|
||||
if (isNaN(rate) || rate === null) {
|
||||
// if passed rate is incorrect use select value
|
||||
rate = Config.GetOption("refresh").Get();
|
||||
if (isNaN(rate)) {
|
||||
if (isNaN(rate) || rate === null) {
|
||||
// if that's also borked use default 15
|
||||
rate = 15;
|
||||
}
|
||||
}
|
||||
// don't allow setting refresh rate lower than 1s
|
||||
if (rate < 1) {
|
||||
rate = 1;
|
||||
}
|
||||
refreshInterval = rate;
|
||||
Progress.Reset();
|
||||
};
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user