Skip to content

Commit 5192e9a

Browse files
author
Mohsen Azimi
committed
Guard against invalid paths in walk
1 parent b628507 commit 5192e9a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/scripts/services/fold-manager.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ function FoldManager(Editor, FoldPointFinder) {
4747
}
4848

4949
while (keys.length) {
50+
if (!current && !current.subFolds) {
51+
break;
52+
}
5053
current = current.subFolds[keys.shift()];
5154
}
5255

0 commit comments

Comments
 (0)