mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 03:38:53 -05:00
[V3 i18n] add a NoneType check on trying to normalize a string (#1632)
Fixes #1631
This commit is contained in:
parent
8739c04024
commit
28bbe9c646
@ -124,6 +124,9 @@ def _normalize(string, remove_newline=False):
|
||||
s += ' '
|
||||
return s
|
||||
|
||||
if string is None:
|
||||
return ""
|
||||
|
||||
string = string.replace('\\n\\n', '\n\n')
|
||||
string = string.replace('\\n', ' ')
|
||||
string = string.replace('\\"', '"')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user