fix(xo-web/xoa/update): handle installer2 namespace

This commit is contained in:
Julien Fontanet
2020-12-17 14:23:03 +01:00
parent 339f012794
commit 9aae154c4e

View File

@@ -205,8 +205,17 @@ const Updates = decorate([
installedPackages: COMMUNITY
? () => ({ 'xen-orchestra': 'sources' })
: async function () {
const { engine, installer, updater, npm } = await xoaUpdater.getLocalManifest()
return { ...engine, ...installer, ...updater, ...npm }
const {
engine,
// installer is deprecated and use as a fallback
installer,
installer2 = installer,
updater,
npm,
} = await xoaUpdater.getLocalManifest()
return { ...engine, ...installer2, ...updater, ...npm }
},
isDisconnected: (_, { xoaUpdaterState }) => xoaUpdater === 'disconnected' || xoaUpdaterState === 'error',
isProxyConfigEdited: state => PROXY_ENTRIES.some(entry => state[entry] !== undefined),