mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix nasty recursion bug.
This commit is contained in:
parent
6ad3575579
commit
07bc32118b
@ -1954,7 +1954,7 @@ class MobiWriter(object):
|
||||
first = False
|
||||
else :
|
||||
self._oeb.logger.info('Generating flat CTOC ...')
|
||||
for (i, child) in enumerate(toc.iter()):
|
||||
for (i, child) in enumerate(toc.iterdescendants()):
|
||||
# Only add chapters or articles at depth==1
|
||||
# no class defaults to 'chapter'
|
||||
if child.klass is None : child.klass = 'chapter'
|
||||
|
Loading…
x
Reference in New Issue
Block a user