mirror of
https://github.com/zadam/trilium.git
synced 2025-06-05 01:18:44 +02:00
toc fix
This commit is contained in:
parent
b0cc177d84
commit
5bf9c253f2
@ -151,7 +151,8 @@ export default class TocWidget extends CollapsibleWidget {
|
||||
}
|
||||
} else if (levelDelta < 0) {
|
||||
// Close as many lists as curLevel - newLevel
|
||||
for (let i = 0; i < -levelDelta; ++i) {
|
||||
// be careful not to empty $ols completely, the root element should stay (could happen with a rogue h1 element)
|
||||
for (let i = 0; i < -levelDelta && $ols.length > 1; ++i) {
|
||||
$ols.pop();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user