mirror of
https://github.com/nasa/openmct.git
synced 2025-02-05 18:49:18 +00:00
fix missing clock on independent time mode change
This commit is contained in:
parent
a0299820ed
commit
0254367cd5
@ -324,9 +324,17 @@ class IndependentTimeContext extends TimeContext {
|
|||||||
return this.upstreamTimeContext.setMode(...arguments);
|
return this.upstreamTimeContext.setMode(...arguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mode === MODES.realtime && this.activeClock === undefined) {
|
if (mode === MODES.realtime) {
|
||||||
|
// TODO: This should probably happen up front in creating an independent time context
|
||||||
|
// TODO: not just in time every time setMode is called
|
||||||
|
if (this.activeClock === undefined) {
|
||||||
|
this.activeClock = this.globalTimeContext.getClock();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.activeClock === undefined) {
|
||||||
throw `Unknown clock. Has a clock been registered with 'addClock'?`;
|
throw `Unknown clock. Has a clock been registered with 'addClock'?`;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (mode !== this.mode) {
|
if (mode !== this.mode) {
|
||||||
this.mode = mode;
|
this.mode = mode;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user