Skip to content

Commit

Permalink
Avoid type that do not match regex in TypeSelect
Browse files Browse the repository at this point in the history
  • Loading branch information
cmd-ntrf committed Mar 6, 2024
1 parent ed17be0 commit cda82fc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/src/components/cluster/TypeSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ export default {
items() {
let items = [];
TYPE_CATEGORIES.forEach(({ prefix, name }) => {
const types = this.types.filter((type) => type.startsWith(prefix));
const types = this.types.filter((type) => {
type.startsWith(prefix) && type.match(TYPE_REGEX) != null;
});
if (types.length > 0) {
if (items.length > 0) {
items.push({ divider: true });
Expand Down

0 comments on commit cda82fc

Please sign in to comment.