fix nav error when current conditions data does not load
This commit is contained in:
parent
e67774aa23
commit
20e0b1f1ac
|
@ -178,7 +178,15 @@ const navigation = (() => {
|
||||||
progress.hideCanvas();
|
progress.hideCanvas();
|
||||||
if (!current) {
|
if (!current) {
|
||||||
// special case for no active displays (typically on progress screen)
|
// special case for no active displays (typically on progress screen)
|
||||||
displays[0].navNext(msg.command.firstFrame);
|
// find the first ready display
|
||||||
|
let firstDisplay;
|
||||||
|
let displayCount = 0;
|
||||||
|
do {
|
||||||
|
if (displays[displayCount].status === STATUS.loaded) firstDisplay = displays[displayCount];
|
||||||
|
displayCount += 1;
|
||||||
|
} while (!firstDisplay && displayCount < displays.length);
|
||||||
|
|
||||||
|
firstDisplay.navNext(msg.command.firstFrame);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (direction === msg.command.nextFrame) currentDisplay().navNext();
|
if (direction === msg.command.nextFrame) currentDisplay().navNext();
|
||||||
|
|
Loading…
Reference in a new issue