randydev commited on
Commit
483b259
·
verified ·
1 Parent(s): 8717f89

fix ignore

Browse files
Files changed (1) hide show
  1. helper_regex.py +4 -1
helper_regex.py CHANGED
@@ -32,7 +32,10 @@ def contains_stylish_with_whitelist(text: str) -> bool:
32
  "\U0001F1E6-\U0001F1FF"
33
  "\u2600-\u26FF\u2700-\u27BF]+", flags=re.UNICODE
34
  )
35
- text_wo_emoji = emoji_pattern.sub('', text)
 
 
 
36
 
37
  words = text_wo_emoji.split()
38
  for word in words:
 
32
  "\U0001F1E6-\U0001F1FF"
33
  "\u2600-\u26FF\u2700-\u27BF]+", flags=re.UNICODE
34
  )
35
+ try:
36
+ text_wo_emoji = emoji_pattern.sub('', text)
37
+ except TypeError:
38
+ return False
39
 
40
  words = text_wo_emoji.split()
41
  for word in words: