fix empty mind map issue (#1991)

### What problem does this PR solve?

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu 2024-08-19 09:24:03 +08:00 committed by GitHub
parent a74c0ccce0
commit 2302a6baba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -105,6 +105,9 @@ class MindMapExtractor:
for i, _ in enumerate(threads):
res.append(_.result())
if not res:
return MindMapResult(output={"root":{}})
merge_json = reduce(self._merge, res)
if len(merge_json.keys()) > 1:
keyset = set(