diff --git a/src/Http/Controllers/CP/Fields/FieldsController.php b/src/Http/Controllers/CP/Fields/FieldsController.php index 31f178b24aa..6e7e673dd9e 100644 --- a/src/Http/Controllers/CP/Fields/FieldsController.php +++ b/src/Http/Controllers/CP/Fields/FieldsController.php @@ -68,7 +68,7 @@ public function update(Request $request) 'handle' => [ function ($attribute, $value, $fail) use ($request) { $existingFieldWithHandle = collect($request->fields ?? []) - ->when($request->id, fn ($collection) => $collection->reject(fn ($field) => $field['_id'] === $request->id)) + ->when($request->has('id'), fn ($collection) => $collection->reject(fn ($field) => $field['_id'] === $request->id)) ->flatMap(function (array $field) { if ($field['type'] === 'import') { return Fieldset::find($field['fieldset'])->fields()->all()->map->handle()->toArray();