mirror of
https://github.com/filecoin-project/slate.git
synced 2024-12-26 02:24:44 +03:00
fix(Strings/capitalize): error occuring when passing empty string
This commit is contained in:
parent
5c4d723296
commit
4d8514b4dc
@ -335,4 +335,4 @@ export const createSlug = (text, base = "untitled") => {
|
||||
return text;
|
||||
};
|
||||
|
||||
export const capitalize = (str = "") => str[0].toUpperCase() + str.slice(1);
|
||||
export const capitalize = (str = "") => str[0]?.toUpperCase() + str?.slice(1);
|
||||
|
Loading…
Reference in New Issue
Block a user