apt repositories: avoid potential type error in classifyOrigin helper

with undefined (or otherwise falsy) argument.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
(cherry picked from commit a14bafeca6)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Fiona Ebner 2023-06-09 16:16:26 +02:00 committed by Thomas Lamprecht
parent 13b101437c
commit 03f664dd2d

View File

@ -406,6 +406,7 @@ Ext.define('Proxmox.node.APTRepositories', {
product: 'Proxmox VE', // default
classifyOrigin: function(origin) {
origin ||= '';
if (origin.match(/^\s*Proxmox\s*$/i)) {
return 'Proxmox';
} else if (origin.match(/^\s*Debian\s*(:?Backports)?$/i)) {