Handle passing None to unicode_normalize

This commit is contained in:
Kovid Goyal 2021-07-05 10:35:09 +05:30
parent 0c03155074
commit ae81ae2b72
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -12,8 +12,10 @@ no_cfi_sort_key = cfi_sort_key('/99999999')
def unicode_normalize(text):
from unicodedata import normalize
return normalize('NFKC', text)
if text:
from unicodedata import normalize
text = normalize('NFKC', text)
return text
def bookmark_sort_key(b):