fix(xo-web/xoa/update): dont fail if channels is undefined

Which is always the case during loading.
This commit is contained in:
Julien Fontanet
2020-02-18 14:35:39 +01:00
parent 7de7cdba60
commit 88f43a8124

View File

@@ -247,8 +247,12 @@ const Updates = decorate([
xoaTrialState.state === 'default' &&
!isTrialRunning(xoaTrialState.trial) &&
!exposeTrial(xoaTrialState.trial),
isUnlistedChannel: ({ consolidatedChannel, channels }) =>
consolidatedChannel !== undefined && !(consolidatedChannel in channels),
isUnlistedChannel: ({ consolidatedChannel, channels }) => {
return (
consolidatedChannel !== undefined &&
!(channels !== undefined && consolidatedChannel in channels)
)
},
isUpdaterDown: (_, { xoaTrialState }) =>
isEmpty(xoaTrialState) || xoaTrialState.state === 'ERROR',
packagesList: ({ installedPackages }) =>