Skip to content

Commit 6e50915

Browse files
committed
fix(format-bad-encoding): make method work with undefined values
1 parent 7d4056e commit 6e50915

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
export function replaceBadEncodedChars(text: string) {
2+
if (!text) return '';
23
return text.replace(/&amp;/gi, '&').replace(/&lt;/gi, '<').replace(/&gt;/gi, '>');
34
}

0 commit comments

Comments
 (0)