Skip to content

Commit a2c5df6

Browse files
committed
fixed edit URL for getFormFieldsForBrowser
1 parent dc2e5ca commit a2c5df6

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

Diff for: src/Repositories/Behaviors/HandleBrowsers.php

+1-6
Original file line numberDiff line numberDiff line change
@@ -201,12 +201,7 @@ function ($relatedElement) use ($titleKey, $routePrefix, $relation, $moduleName,
201201
return [
202202
'id' => $relatedElement->id,
203203
'name' => $relatedElement->titleInBrowser ?? $relatedElement->$titleKey,
204-
'edit' => $relatedElement->adminEditUrl ?? moduleRoute(
205-
$moduleName ?? $relation,
206-
$routePrefix ?? '',
207-
'edit',
208-
$relatedElement->id
209-
),
204+
'edit' => $this->getAdminEditUrl($relatedElement),
210205
'endpointType' => $relatedElement->getMorphClass(),
211206
] + (classHasTrait($relatedElement, HasMedias::class) ? [
212207
'thumbnail' => $relatedElement->defaultCmsImage(['w' => 100, 'h' => 100, 'fit' => 'crop']),

0 commit comments

Comments
 (0)