coyotte508 HF staff commited on
Commit
c379e82
β€’
1 Parent(s): 652223b

πŸ› Fix page switching

Browse files
Files changed (1) hide show
  1. src/lib/utils/upperFirst.ts +3 -0
src/lib/utils/upperFirst.ts CHANGED
@@ -1,3 +1,6 @@
1
  export function upperFirst(s: string): string {
 
 
 
2
  return s[0].toLocaleUpperCase() + s.slice(1);
3
  }
 
1
  export function upperFirst(s: string): string {
2
+ if (!s) {
3
+ return s;
4
+ }
5
  return s[0].toLocaleUpperCase() + s.slice(1);
6
  }