mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-01 19:48:08 +00:00
fix: Fixes parsing issue with custom attributes (#2796)
* fix: Fixes parsing issue with custom attributes * Update app/javascript/dashboard/routes/dashboard/conversation/ContactCustomAttributes.vue Co-authored-by: शैलेश कळमकर (Shailesh Kalamkar) <shailesh.kalamkar@gmail.com> Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com> Co-authored-by: शैलेश कळमकर (Shailesh Kalamkar) <shailesh.kalamkar@gmail.com> Co-authored-by: Sojan Jose <sojan@pepalo.com>
This commit is contained in:
committed by
GitHub
parent
acb39cbc8f
commit
0f148f7700
@@ -45,9 +45,20 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
valueWithLink(attribute) {
|
||||
const messageFormatter = new MessageFormatter(attribute);
|
||||
const parsedAttribute = this.parseAttributeToString(attribute);
|
||||
const messageFormatter = new MessageFormatter(parsedAttribute);
|
||||
return messageFormatter.formattedMessage;
|
||||
},
|
||||
parseAttributeToString(attribute) {
|
||||
switch (typeof attribute) {
|
||||
case 'string':
|
||||
return attribute;
|
||||
case 'object':
|
||||
return JSON.stringify(attribute);
|
||||
default:
|
||||
return `${attribute}`;
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user