Skip to content
This repository was archived by the owner on Jun 10, 2024. It is now read-only.

Commit 849f45c

Browse files
committed
Fix loop detection in relation-tree demo.
1 parent f84adb4 commit 849f45c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

demo/relation-tree/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ function print_recurse(level, id) {
4141
stream.write(indent(level+1) + "LOOP!\n");
4242
}
4343
} else {
44+
relations[id][2] = 'done';
4445
relations[id][1].forEach(function(child) {
4546
print_recurse(level+1, child);
4647
});
47-
relations[id][2] = 'done';
4848
}
4949
} else {
5050
stream.write(" (incomplete)\n");
@@ -65,4 +65,5 @@ handler.on('done', function() {
6565

6666
var reader = new osmium.BasicReader(input_filename);
6767
osmium.apply(reader, handler);
68+
handler.end();
6869

0 commit comments

Comments
 (0)