Skip to content

Commit

Permalink
Fix bug where type icon would fail in iconselect component
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Sep 10, 2024
1 parent 1447953 commit a0f0dbc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
5 changes: 4 additions & 1 deletion api/web/src/components/CloudTAK/util/Icons.vue
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,10 @@ export default {
}
},
mounted: async function() {
await this.fetchList();
// If the icon has a `:` it is part of an iconset, otherwise it is derived from the type
if (this.iconset.includes(':')) {
await this.fetchList();
}
},
methods: {
iconurl: function(icon) {
Expand Down
10 changes: 7 additions & 3 deletions api/web/src/components/util/IconSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,16 @@ export default {
await this.Iconlists();
},
},
modelValue: function() {
if (this.modelValue) this.fetch();
modelValue: async function() {
if (this.modelValue && this.modelValue.includes(":")) {
await this.fetch();
}
}
},
mounted: async function() {
if (this.modelValue) await this.fetch();
if (this.modelValue && this.modelValue.includes(":")) {
await this.fetch();
}
await this.Iconlistsets();
await this.Iconlists();
},
Expand Down

0 comments on commit a0f0dbc

Please sign in to comment.