Fix: canvas list with team. (#10549)

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu
2025-10-14 19:38:54 +08:00
committed by GitHub
parent 960f47c4d4
commit 16b5feadb7
2 changed files with 4 additions and 7 deletions

View File

@ -733,7 +733,7 @@ async def run_toc_from_text(chunks, chat_mdl, callback=None):
max_len = 12 if prune else 22
filtered = []
for x in titles:
if not x.get("title") or x["title"] == "-1":
if not isinstance(x, dict) or not x.get("title") or x["title"] == "-1":
continue
if len(rag_tokenizer.tokenize(x["title"]).split(" ")) > max_len:
continue