mirror of
https://github.com/vale981/tridactyl
synced 2025-03-06 01:51:40 -05:00
styling.ts: Avoir errors when calling capitalise on 0-length strings
This commit is contained in:
parent
3649f692d6
commit
96ebe82149
1 changed files with 1 additions and 0 deletions
|
@ -8,6 +8,7 @@ const logger = new Logging.Logger("styling")
|
|||
const THEMES = ["dark", "greenmat", "shydactyl", "quake"]
|
||||
|
||||
function capitalise(str) {
|
||||
if (str === "") return str
|
||||
return str[0].toUpperCase() + str.slice(1)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue