Skip to content

Commit 8de3429

Browse files
authored
Fix tree walk example
1 parent c478a67 commit 8de3429

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

api/tree/index.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ Return the path of this tree, like `/lib/foo/bar`
334334
## <a name="walk"></a><span>Tree#</span>walk <span class="tags"><span class="sync">Sync</span></span>
335335

336336
```js
337-
var eventEmitter = tree.walk([blobsOnly);
337+
var eventEmitter = tree.walk();
338338

339339
eventEmitter.on('entry', function(tree) {
340340
// Use tree
@@ -347,6 +347,9 @@ eventEmitter.on('end', function(trees) {
347347
eventEmitter.on('error', function(error) {
348348
// Use error
349349
});
350+
351+
// start walking the tree
352+
eventEmitter.start()
350353
```
351354

352355
Recursively walk the tree in breadth-first order. Fires an event for each

0 commit comments

Comments
 (0)