File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -222,8 +222,10 @@ public function processUpdate(ModelInterface $model): void
222222
223223 $ right = $ parentModel ->readAttribute (self ::$ rightKey );
224224 $ depth = $ parentModel ->readAttribute (self ::$ depthKey );
225- if (
226- $ parentModel ->readAttribute (self ::$ rightKey ) > $ currentModel ->readAttribute (self ::$ rightKey )
225+ if ($ currentModel ->readAttribute (self ::$ rightKey ) == 0 ) {
226+ $ right = $ parentModel ->readAttribute (self ::$ rightKey );
227+ $ depth = $ parentModel ->readAttribute (self ::$ depthKey ) + 1 ;
228+ } elseif ($ parentModel ->readAttribute (self ::$ rightKey ) > $ currentModel ->readAttribute (self ::$ rightKey )
227229 && $ parentModel ->readAttribute (self ::$ rightKey ) > $ currentModel ->readAttribute (self ::$ leftKey )
228230 ) {
229231 $ right = $ parentModel ->readAttribute (self ::$ rightKey ) - 2 ;
You can’t perform that action at this time.
0 commit comments