Add null guards

This commit is contained in:
Sakura Knoll
2023-07-11 02:58:24 +09:00 Unverified
parent 4f5055db69
commit 967363e48a
2 changed files with 7 additions and 1 deletions
+4 -1
View File
@@ -64,7 +64,10 @@ export function formatSubSkillInfo({
)
}
export function replaceNewLine(value: string = '') {
export function replaceNewLine(value: string) {
if (value == null) {
value = ''
}
return value.replace(/\\n/g, '\n')
}