File tree 1 file changed +4
-2
lines changed
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
222
222
223
223
$ right = $ parentModel ->readAttribute (self ::$ rightKey );
224
224
$ 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 )
227
229
&& $ parentModel ->readAttribute (self ::$ rightKey ) > $ currentModel ->readAttribute (self ::$ leftKey )
228
230
) {
229
231
$ right = $ parentModel ->readAttribute (self ::$ rightKey ) - 2 ;
You can’t perform that action at this time.
0 commit comments