Skip to content

Commit 5aaf3e3

Browse files
refactor: fix
1 parent fe34608 commit 5aaf3e3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/webpack-cli/src/webpack-cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ class WebpackCLI {
323323
}
324324

325325
capitalizeFirstLetter(str: string): string {
326-
return str.charAt(0).toUpperCase() + str.slice(1);
326+
return str.length > 0 ? str.charAt(0).toUpperCase() + str.slice(1) : str;
327327
}
328328

329329
toKebabCase(str: string): string {

0 commit comments

Comments
 (0)