Merge branch 'hotfix/2.16.1'
This commit is contained in:
@@ -8,7 +8,7 @@ export const replaceVariablesInMessage = ({ message, variables }) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const capitalizeName = name => {
|
export const capitalizeName = name => {
|
||||||
return name.replace(/\b(\w)/g, s => s.toUpperCase());
|
return (name || '').replace(/\b(\w)/g, s => s.toUpperCase());
|
||||||
};
|
};
|
||||||
|
|
||||||
const skipCodeBlocks = str => str.replace(/```(?:.|\n)+?```/g, '');
|
const skipCodeBlocks = str => str.replace(/```(?:.|\n)+?```/g, '');
|
||||||
|
|||||||
@@ -143,6 +143,9 @@ describe('#capitalizeName', () => {
|
|||||||
const string = 'john peter';
|
const string = 'john peter';
|
||||||
expect(capitalizeName(string)).toBe('John Peter');
|
expect(capitalizeName(string)).toBe('John Peter');
|
||||||
});
|
});
|
||||||
|
it('returns empty string if the name is null', () => {
|
||||||
|
expect(capitalizeName(null)).toBe('');
|
||||||
|
});
|
||||||
it('capitalize first name if full name is passed', () => {
|
it('capitalize first name if full name is passed', () => {
|
||||||
const string = 'john Doe';
|
const string = 'john Doe';
|
||||||
expect(capitalizeName(string)).toBe('John Doe');
|
expect(capitalizeName(string)).toBe('John Doe');
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
shared: &shared
|
shared: &shared
|
||||||
version: '2.16.0'
|
version: '2.16.1'
|
||||||
|
|
||||||
development:
|
development:
|
||||||
<<: *shared
|
<<: *shared
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@chatwoot/chatwoot",
|
"name": "@chatwoot/chatwoot",
|
||||||
"version": "2.16.0",
|
"version": "2.16.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"eslint": "eslint app/**/*.{js,vue}",
|
"eslint": "eslint app/**/*.{js,vue}",
|
||||||
|
|||||||
Reference in New Issue
Block a user