Minor PR comments
Removed a null check and intialised `this.context` to an empty object.
This commit is contained in:
parent
46511bcfe8
commit
5d29ab1d42
|
@ -14,7 +14,7 @@ class EmbarkController {
|
||||||
|
|
||||||
// set a default context. should be overwritten by an action
|
// set a default context. should be overwritten by an action
|
||||||
// method before being used
|
// method before being used
|
||||||
this.context = [constants.contexts.any];
|
this.context = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
initConfig(env, options) {
|
initConfig(env, options) {
|
||||||
|
|
|
@ -53,7 +53,6 @@ export function getProcesses(state) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getProcessLogs(state) {
|
export function getProcessLogs(state) {
|
||||||
if(!state.entities.processLogs.length) return [];
|
|
||||||
const processLogsObj = state.entities.processLogs.reduce((processLogs, processLog) => {
|
const processLogsObj = state.entities.processLogs.reduce((processLogs, processLog) => {
|
||||||
const existingProcessLog = processLogs[processLog.process];
|
const existingProcessLog = processLogs[processLog.process];
|
||||||
if(!existingProcessLog || processLog.timestamp > existingProcessLog.timestamp){
|
if(!existingProcessLog || processLog.timestamp > existingProcessLog.timestamp){
|
||||||
|
|
Loading…
Reference in New Issue