Skip to content

Commit

Permalink
Renderer: fixed export of snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Apr 29, 2021
1 parent dbf409f commit 7799297
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Tracy/Dumper/Renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ final class Renderer
/** @var Value[]|null */
private $snapshotSelection;

/** @var array */
private $snapshotParents = [];

/** @var array */
private $parents = [];

Expand Down Expand Up @@ -442,10 +445,10 @@ private function copySnapshot($value): void
return;
}
$ref = $this->snapshotSelection[$value->value] = $this->snapshot[$value->value];
if (!isset($this->parents[$value->value])) {
$this->parents[$value->value] = true;
if (!isset($this->snapshotParents[$value->value])) {
$this->snapshotParents[$value->value] = true;
$this->copySnapshot($ref);
unset($this->parents[$value->value]);
unset($this->snapshotParents[$value->value]);
}
} elseif ($value instanceof Value && $value->items) {
foreach ($value->items as [, $v]) {
Expand Down

0 comments on commit 7799297

Please sign in to comment.