mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1973400 [Private bug](https://bugs.launchpad.net/calibre/+bug/1973400)
This commit is contained in:
parent
cc7d9d08f3
commit
8fbf09a641
@ -264,7 +264,10 @@ class TOC(QStandardItemModel):
|
||||
def find_items(self, query):
|
||||
for item in self.all_items:
|
||||
text = item.text()
|
||||
if not query or (text and primary_contains(query, text)):
|
||||
if query and isinstance(query, str):
|
||||
if text and isinstance(text, str) and primary_contains(query, text):
|
||||
yield item
|
||||
else:
|
||||
yield item
|
||||
|
||||
def items_at_depth(self, depth):
|
||||
|
Loading…
x
Reference in New Issue
Block a user