diff --git a/core/modules/options/options.api.php b/core/modules/options/options.api.php
index a4ac605d4c95e66d34866166a62d98cae92c4212..28ac77114ed371d4e9159e9029f94cf0221e9715 100644
--- a/core/modules/options/options.api.php
+++ b/core/modules/options/options.api.php
@@ -20,7 +20,7 @@
  *   properties.
  * @param array $context
  *   An associative array containing:
- *   - field_definition: The field definition
+ *   - fieldDefinition: The field definition
  *     (\Drupal\Core\Field\FieldDefinitionInterface).
  *   - entity: The entity object the field is attached to
  *     (\Drupal\Core\Entity\EntityInterface).
@@ -30,7 +30,7 @@
  */
 function hook_options_list_alter(array &$options, array $context) {
   // Check if this is the field we want to change.
-  if ($context['field']->id() == 'field_option') {
+  if ($context['fieldDefinition']->id() == 'field_option') {
     // Change the label of the empty option.
     $options['_none'] = t('== Empty ==');
   }