M #~: Fix minor to get VM hypervisor (#1854)

Co-authored-by: Tino Vázquez <cvazquez@opennebula.io>
(cherry picked from commit 104a6108a4)
This commit is contained in:
Sergio Betanzos authored and Tino Vazquez committed 2022-03-17 17:00:32 +01:00
1 parent 5695b00d2b
commit 86cefb1bec
1 file changed
+2 -3
@@ -84,10 +84,9 @@ export const getType = (vm) =>
/**
* @param {VM} vm - Virtual machine
* @returns {string} Resource hypervisor
* @returns {string} VM hypervisor from latest history record
*/
export const getHypervisor = (vm) =>
String(getLastHistory(vm)?.VM_MAD).toLowerCase()
export const getHypervisor = (vm) => getLastHistory(vm)?.VM_MAD
/**
* @param {VM} vm - Virtual machine