Fix inability to reconfigure charts without corresponding repository

This commit is contained in:
Andrei Pohilko
2023-02-16 12:32:48 +00:00
parent 3060b92f8e
commit 709c3c600b

View File

@@ -170,14 +170,13 @@ $('#upgradeModal select').change(function () {
const self = $(this) const self = $(this)
const ver = self.find("option:selected").data("ver"); const ver = self.find("option:selected").data("ver");
let chart = ver.repository + "/" + ver.name; let chart = ""
if (!ver.name) { if (ver) {
chart = "" chart = ver.repository + "/" + ver.name;
} // local chart case
if (ver.urls && ver.urls.length && ver.urls[0].startsWith("file://")) {
// local chart case chart = ver.urls[0];
if (ver.urls && ver.urls.length && ver.urls[0].startsWith("file://")) { }
chart = ver.urls[0];
} }
$('#upgradeModal').data("chart", chart) $('#upgradeModal').data("chart", chart)