Skip to content

Commit 4af9e30

Browse files
authored
Fix caption being "None" when passing None (pyrogram#879)
1 parent 7d44438 commit 4af9e30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyrogram/parser/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def __init__(self, client: Optional["pyrogram.Client"]):
3131
self.markdown = Markdown(client)
3232

3333
async def parse(self, text: str, mode: Optional[str] = object):
34-
text = str(text).strip()
34+
text = str(text if text else "").strip()
3535

3636
if mode == object:
3737
if self.client:

0 commit comments

Comments
 (0)