fix(@desktop/community): empty tag string creation
This commit is contained in:
parent
7d88adcbe1
commit
3de073edb8
|
@ -43,21 +43,21 @@ StatusSectionLayout {
|
|||
property bool hasAddedContacts: false
|
||||
|
||||
readonly property string filteredSelectedTags: {
|
||||
var tagsArray = []
|
||||
if (community && community.tags) {
|
||||
try {
|
||||
const json = JSON.parse(community.tags);
|
||||
const tagsArray = !!json ? json.map(tag => {
|
||||
return tag.name;
|
||||
}) : "";
|
||||
return JSON.stringify(tagsArray);
|
||||
const json = JSON.parse(community.tags)
|
||||
if (!!json) {
|
||||
tagsArray = json.map(tag => {
|
||||
return tag.name
|
||||
})
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
console.warn("Error parsing community tags: ", community.tags, " error: ", e.message)
|
||||
return ""
|
||||
}
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
return JSON.stringify(tagsArray);
|
||||
}
|
||||
|
||||
signal backToCommunityClicked
|
||||
|
|
Loading…
Reference in New Issue