Commit b9380197 authored by Sean Hammond's avatar Sean Hammond

Simplify some code

getBreakpoint() always return a breakpoint.
parent 8f11738a
......@@ -114,13 +114,12 @@ function nextFuzzyUpdate(date) {
return null;
}
var breakpoint = getBreakpoint(date, new Date());
if (!breakpoint) {
var secs = getBreakpoint(date, new Date())[2];
if (secs === null) {
return null;
}
var secs = breakpoint[2];
// We don't want to refresh anything more often than 5 seconds
secs = Math.max(secs, 5);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment