mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
fixed empty title error
This commit is contained in:
parent
eade3efc7c
commit
8ad5576983
2 changed files with 5 additions and 2 deletions
|
@ -11,7 +11,9 @@ type IProps = RouteComponentProps & {
|
|||
};
|
||||
|
||||
const getTitleLetters = (title: string): string => {
|
||||
const words = title.split(' ');
|
||||
const words = (title && title.split(' ')) || [];
|
||||
|
||||
if (!words.length) return '';
|
||||
|
||||
return words.length > 1
|
||||
? words
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue