mirror of
https://github.com/nasa/openmct.git
synced 2025-06-11 20:01:41 +00:00
Removed redundant undefined check, and renamed allTimeSystems to getAllTimeSystems
This commit is contained in:
@ -144,13 +144,13 @@ define(
|
|||||||
|
|
||||||
|
|
||||||
TimeConductorController.prototype.getClock = function (key) {
|
TimeConductorController.prototype.getClock = function (key) {
|
||||||
return this.timeAPI.allClocks().filter(function (clock) {
|
return this.timeAPI.getAllClocks().filter(function (clock) {
|
||||||
return clock.key === key;
|
return clock.key === key;
|
||||||
})[0];
|
})[0];
|
||||||
};
|
};
|
||||||
|
|
||||||
TimeConductorController.prototype.getTimeSystem = function (key) {
|
TimeConductorController.prototype.getTimeSystem = function (key) {
|
||||||
return this.timeAPI.allTimeSystems().filter(function (timeSystem) {
|
return this.timeAPI.getAllTimeSystems().filter(function (timeSystem) {
|
||||||
return timeSystem.key === key;
|
return timeSystem.key === key;
|
||||||
})[0];
|
})[0];
|
||||||
};
|
};
|
||||||
|
@ -83,7 +83,7 @@ define(['EventEmitter'], function (EventEmitter) {
|
|||||||
this.timeSystems.set(timeSystem.key, timeSystem);
|
this.timeSystems.set(timeSystem.key, timeSystem);
|
||||||
};
|
};
|
||||||
|
|
||||||
TimeAPI.prototype.allTimeSystems = function () {
|
TimeAPI.prototype.getAllTimeSystems = function () {
|
||||||
return Array.from(this.timeSystems.values());
|
return Array.from(this.timeSystems.values());
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ define(['EventEmitter'], function (EventEmitter) {
|
|||||||
this.clocks.set(clock.key, clock);
|
this.clocks.set(clock.key, clock);
|
||||||
};
|
};
|
||||||
|
|
||||||
TimeAPI.prototype.allClocks = function () {
|
TimeAPI.prototype.getAllClocks = function () {
|
||||||
return Array.from(this.clocks.values());
|
return Array.from(this.clocks.values());
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ define([], function () {
|
|||||||
return function (openmct) {
|
return function (openmct) {
|
||||||
|
|
||||||
function getTimeSystem(key) {
|
function getTimeSystem(key) {
|
||||||
return openmct.time.allTimeSystems().filter(function (timeSystem) {
|
return openmct.time.getAllTimeSystems().filter(function (timeSystem) {
|
||||||
return timeSystem.key === key;
|
return timeSystem.key === key;
|
||||||
})[0];
|
})[0];
|
||||||
}
|
}
|
||||||
@ -68,7 +68,7 @@ define([], function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var configForTimeSystem = config.menuOptions.filter(function (menuOption) {
|
var configForTimeSystem = config.menuOptions.filter(function (menuOption) {
|
||||||
return menuOption.timeSystem === (timeSystem && timeSystem.key) && menuOption.clock === (clock && clock.key);
|
return menuOption.timeSystem === timeSystem.key && menuOption.clock === (clock && clock.key);
|
||||||
})[0];
|
})[0];
|
||||||
|
|
||||||
if (configForTimeSystem !== undefined) {
|
if (configForTimeSystem !== undefined) {
|
||||||
|
Reference in New Issue
Block a user