mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-13 15:02:22 +00:00
ui: Parser: fix bind and dev mounts for lxc
match returns 'null' if the regex does not match, which is not destructurable. so we have to save the match and check if it valid Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
3f7d054ee1
commit
308d9f365c
@ -367,9 +367,9 @@ Ext.define('PVE.Parser', {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const [, storage] = res.file.match(/^([a-z][a-z0-9\-_.]*[a-z0-9]):/i);
|
||||
if (storage) {
|
||||
res.storage = storage;
|
||||
const match = res.file.match(/^([a-z][a-z0-9\-_.]*[a-z0-9]):/i);
|
||||
if (match) {
|
||||
res.storage = match[1];
|
||||
res.type = 'volume';
|
||||
} else if (res.file.match(/^\/dev\//)) {
|
||||
res.type = 'device';
|
||||
|
Loading…
Reference in New Issue
Block a user