fix #2223: fix set_button_status isCDRom

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@proxmox.com>
This commit is contained in:
Dominik Csapak 2019-05-29 15:36:03 +02:00 committed by Thomas Lamprecht
parent c3d9c6980d
commit 2e1a8291d6

View File

@ -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' &&