Skip to content

Commit 0b1ff76

Browse files
committed
fix: dont crash if content is not string
1 parent 6d63f6a commit 0b1ff76

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/parseContent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function parseContent(content, banned_words, banned_urls, censorWholeWord, symbo
2828
}
2929

3030
var replacement = censorWholeWord ? '[censored]' : censor;
31-
return content
31+
return String(content)
3232
.replace(banned_words, replacement)
3333
.replace(banned_urls, '[link removed]');
3434
}

0 commit comments

Comments
 (0)