[VarDumper] Cyclic searching dumps

This commit is contained in:
Roland Franssen 2017-05-25 17:49:46 +02:00 committed by Fabien Potencier
parent bdd888feca
commit 0821c5a059

View File

@ -425,7 +425,7 @@ return function (root, x) {
if (this.isEmpty()) {
return this.current();
}
this.idx = this.idx < (this.nodes.length - 1) ? this.idx + 1 : this.idx;
this.idx = this.idx < (this.nodes.length - 1) ? this.idx + 1 : 0;
return this.current();
},
@ -433,7 +433,7 @@ return function (root, x) {
if (this.isEmpty()) {
return this.current();
}
this.idx = this.idx > 0 ? this.idx - 1 : this.idx;
this.idx = this.idx > 0 ? this.idx - 1 : (this.nodes.length - 1);
return this.current();
},