Skip to content

Commit 09e4c18

Browse files
authored
Merge pull request #251 from tmehnert/fix-project-view-details-display-wrong-tags
2 parents 1c24842 + 8377370 commit 09e4c18

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/views/portfolio/projects/ProjectDetailsModal.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<b-modal id="projectDetailsModal" size="md" hide-header-close no-stacking :title="$t('message.project_details')">
2+
<b-modal id="projectDetailsModal" size="md" hide-header-close no-stacking :title="$t('message.project_details')" @show="initializeTags">
33
<b-tabs class="body-bg-color" style="border:0;padding:0">
44
<b-tab class="body-bg-color" style="border:0;padding:0" active>
55
<template v-slot:title><i class="fa fa-edit"></i> {{ $t('message.general') }}</template>
@@ -125,13 +125,13 @@
125125
}
126126
},
127127
beforeUpdate() {
128-
if (this.tags.length === 0 && this.project && this.project.tags) { // Prevents line from being executed when entering new tags
129-
this.project.tags.forEach((tag) => this.tags.push({text: tag.name}));
130-
}
131128
this.readOnlyProjectName = this.project.name;
132129
this.readOnlyProjectVersion = this.project.version;
133130
},
134131
methods: {
132+
initializeTags: function() {
133+
this.tags = (this.project.tags || []).map(tag => ({ text: tag.name }));
134+
},
135135
syncReadOnlyNameField: function(value) {
136136
this.readOnlyProjectName = value;
137137
},

0 commit comments

Comments
 (0)