All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 88119b01 authored by Leigh B Stoller's avatar Leigh B Stoller

Fix corner case bug in Search.

parent 155777ec
......@@ -552,6 +552,7 @@ $(function ()
if (starttime == null) {
return;
}
// enddata can be null if we fit on the last timeline entry.
console.info("FindFit: ", startdata, enddata);
var start = moment(starttime * 1000);
......@@ -569,8 +570,9 @@ $(function ()
if (start.hour() < IDEAL_STARTHOUR) {
var tmp = moment(start);
tmp.hour(IDEAL_STARTHOUR);
if (tmp.unix() + ((3600 * 24 * days)) < enddata.t) {
// If no enddata then we can definitely shift it.
if (!enddata || tmp.unix() + ((3600 * 24 * days)) < enddata.t) {
console.info("Shifting to later start time");
start = tmp;
}
......
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