Skip to content

Commit 0821c5a

Browse files
ro0NLfabpot
authored andcommitted
[VarDumper] Cyclic searching dumps
1 parent bdd888f commit 0821c5a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,15 +425,15 @@ function xpathString(str) {
425425
if (this.isEmpty()) {
426426
return this.current();
427427
}
428-
this.idx = this.idx < (this.nodes.length - 1) ? this.idx + 1 : this.idx;
428+
this.idx = this.idx < (this.nodes.length - 1) ? this.idx + 1 : 0;
429429
430430
return this.current();
431431
},
432432
previous: function () {
433433
if (this.isEmpty()) {
434434
return this.current();
435435
}
436-
this.idx = this.idx > 0 ? this.idx - 1 : this.idx;
436+
this.idx = this.idx > 0 ? this.idx - 1 : (this.nodes.length - 1);
437437
438438
return this.current();
439439
},

0 commit comments

Comments
 (0)