From b29ad2c43b0e8468b34f7b55f6d16b455e6e00ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix-Antoine=20Fortin?= Date: Thu, 13 Jun 2024 17:08:59 -0400 Subject: [PATCH] Handle case where instance type does not match regex --- frontend/src/components/cluster/TypeSelect.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/cluster/TypeSelect.vue b/frontend/src/components/cluster/TypeSelect.vue index 62fed952..715d9108 100644 --- a/frontend/src/components/cluster/TypeSelect.vue +++ b/frontend/src/components/cluster/TypeSelect.vue @@ -79,7 +79,11 @@ export default { }, methods: { getTypeDescription(typeName) { - const namedGroupMatches = typeName.match(TYPE_REGEX).groups; + let namedGroupMatches = {}; + const typeMatchRegex = typeName.match(TYPE_REGEX); + if (typeMatchRegex != null) { + namedGroupMatches = typeMatchRegex.groups; + } let descriptionElements = []; if (typeof namedGroupMatches["gpu"] !== "undefined") {