[pve-devel] [PATCH manager] fix #2223: fix set_button_status isCDRom

Dominik Csapak d.csapak at proxmox.com
Wed May 29 15:36:03 CEST 2019


value is not always a string (depending on the value that changed),
so we have to convert it to a string to have a 'match' function

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/qemu/HardwareView.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/manager6/qemu/HardwareView.js b/www/manager6/qemu/HardwareView.js
index 33e50414..20f54cbe 100644
--- a/www/manager6/qemu/HardwareView.js
+++ b/www/manager6/qemu/HardwareView.js
@@ -575,7 +575,7 @@ Ext.define('PVE.qemu.HardwareView', {
 	    var rowdef = rows[key];
 
 	    var pending = rec.data['delete'] || me.hasPendingChanges(key);
-	    var isCDRom = (value && !!value.match(/media=cdrom/));
+	    var isCDRom = (value && !!value.toString().match(/media=cdrom/));
 	    var isUnusedDisk = key.match(/^unused\d+/);
 	    var isUsedDisk = !isUnusedDisk &&
 		rowdef.tdCls == 'pve-itype-icon-storage' &&
-- 
2.11.0





More information about the pve-devel mailing list