Skip to content

Commit 81c241d

Browse files
author
Mohsen Azimi
committed
Tidy up fold manager
1 parent a8f760f commit 81c241d

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

app/scripts/services/fold-manager.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,14 @@ function FoldManager(Editor, FoldPointFinder) {
2828
}
2929

3030
function walk(keys) {
31-
var key, current = buffer;
31+
var current = buffer;
3232

3333
if (!Array.isArray(keys) || !keys.length) {
3434
throw new Error('Need path for fold in fold buffer');
3535
}
3636

3737
while (keys.length) {
38-
key = keys.shift();
39-
if (!current.subFolds[key]) {
40-
throw new Error('Can not toggle lookup ' + keys.join('.') + 'in fold buffer');
41-
} else {
42-
current = current.subFolds[key];
43-
}
38+
current = current.subFolds[keys.shift()];
4439
}
4540

4641
return current;

app/spec-files/default.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,11 @@ paths:
185185
schema:
186186
$ref: User
187187
/user/logout:
188-
get: {}
188+
get:
189+
responses:
190+
-
191+
200:
192+
description: Logs you out
189193
/user/login:
190194
get:
191195
parameters:

0 commit comments

Comments
 (0)