hotfix: glaring mistake while parsing text runs

This commit is contained in:
2025-10-05 18:15:56 +02:00
parent 5944fd2458
commit 002e3cba33

View File

@@ -471,7 +471,7 @@ def extractTextFromSimpleOrRuns(obj: dict, default: str = "") -> str:
# Extracts the text both from "runs" and "simpleText" # Extracts the text both from "runs" and "simpleText"
# with failsafe to default. # with failsafe to default.
text = default text = default
if not isinstance(obj, str): if not isinstance(obj, dict):
return default return default
if "runs" in obj: if "runs" in obj:
text = runsToText(obj["runs"]) text = runsToText(obj["runs"])