diff --git a/NestedSetsBehavior.php b/NestedSetsBehavior.php index 62d7a11..d555d90 100644 --- a/NestedSetsBehavior.php +++ b/NestedSetsBehavior.php @@ -246,7 +246,7 @@ class NestedSetsBehavior extends Behavior $prev = $depth; } - $nodes[$this->owner->getAttribute($this->leftAttribute)] = $this->owner; + $nodes[] = $this->owner; foreach ($nodes as $node) { $key = $node->getAttribute($this->leftAttribute); if (isset($relates[$key])) {