@@ -453,10 +453,10 @@ protected function getMergePropsForRequest(Request $request): Collection
453453
454454 return collect ($ this ->props )
455455 ->filter (fn ($ prop ) => $ prop instanceof Mergeable)
456- ->filter (fn ($ prop ) => $ prop ->shouldMerge ())
457- ->reject (fn ($ _ , $ key ) => in_array ($ key , $ resetProps ))
458- ->filter (fn ($ _ , $ key ) => count ($ onlyProps ) === 0 || in_array ($ key , $ onlyProps ))
459- ->reject (fn ($ _ , $ key ) => in_array ($ key , $ exceptProps ));
456+ ->filter (fn (Mergeable $ prop ) => $ prop ->shouldMerge ())
457+ ->reject (fn ($ _ , string $ key ) => in_array ($ key , $ resetProps ))
458+ ->filter (fn ($ _ , string $ key ) => count ($ onlyProps ) === 0 || in_array ($ key , $ onlyProps ))
459+ ->reject (fn ($ _ , string $ key ) => in_array ($ key , $ exceptProps ));
460460 }
461461
462462 /**
@@ -467,8 +467,8 @@ protected function getMergePropsForRequest(Request $request): Collection
467467 public function resolveScrollProps (Request $ request ): array
468468 {
469469 $ scrollProps = $ this ->getMergePropsForRequest ($ request )
470- ->filter (fn ($ prop ) => $ prop instanceof ScrollProp)
471- ->each (fn (ScrollProp $ prop ) => $ prop ->setMergeStrategy ($ request ))
470+ ->filter (fn (Mergeable $ prop ) => $ prop instanceof ScrollProp)
471+ ->each (fn (ScrollProp $ prop ) => $ prop ->configureMergeDirection ($ request ))
472472 ->mapWithKeys (fn (ScrollProp $ prop , string $ key ) => [$ key => $ prop ->meta ()]);
473473
474474 return $ scrollProps ->isNotEmpty () ? ['scrollProps ' => $ scrollProps ->toArray ()] : [];
@@ -483,9 +483,13 @@ public function resolveMergeProps(Request $request): array
483483 {
484484 $ mergeProps = $ this ->getMergePropsForRequest ($ request );
485485
486+ $ mergePropsWithAppendOrPrependPath = $ mergeProps
487+ ->filter (fn (Mergeable $ prop ) => $ prop ->hasAppendPaths () || $ prop ->hasPrependPaths ())
488+ ->keys ();
489+
486490 $ deepMergeProps = $ mergeProps
487- ->reject (fn ($ prop ) => $ prop -> hasAppendPaths () || $ prop -> hasPrependPaths ( ))
488- ->filter (fn ($ prop ) => $ prop ->shouldDeepMerge ())
491+ ->reject (fn ($ _ , string $ key ) => $ mergePropsWithAppendOrPrependPath -> contains ( $ key ))
492+ ->filter (fn (Mergeable $ prop ) => $ prop ->shouldDeepMerge ())
489493 ->keys ();
490494
491495 $ matchPropsOn = $ mergeProps
@@ -498,12 +502,12 @@ public function resolveMergeProps(Request $request): array
498502 ->values ();
499503
500504 $ prependProps = $ mergeProps
501- ->reject (fn ($ prop ) => $ prop -> hasAppendPaths () || $ prop -> hasPrependPaths ( ))
505+ ->reject (fn ($ _ , string $ key ) => $ mergePropsWithAppendOrPrependPath -> contains ( $ key ))
502506 ->filter (fn (Mergeable $ prop ) => ! $ prop ->shouldAppend () && ! $ prop ->shouldDeepMerge ())
503507 ->keys ();
504508
505509 $ mergeProps = $ mergeProps
506- ->reject (fn ($ prop ) => $ prop -> hasAppendPaths () || $ prop -> hasPrependPaths ( ))
510+ ->reject (fn ($ _ , string $ key ) => $ mergePropsWithAppendOrPrependPath -> contains ( $ key ))
507511 ->filter (fn (Mergeable $ prop ) => $ prop ->shouldAppend () && ! $ prop ->shouldDeepMerge ())
508512 ->keys ();
509513
0 commit comments