From 712f62b2a8ee13140411b3330f824999c9f436b8 Mon Sep 17 00:00:00 2001 From: Nicholas Thompson Date: Fri, 25 Oct 2019 02:01:40 +0100 Subject: [PATCH] Fix bug when retrieving field values --- src/Schema.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Schema.php b/src/Schema.php index 06867c5..b13bd94 100644 --- a/src/Schema.php +++ b/src/Schema.php @@ -1537,12 +1537,7 @@ public function getFields($entity_type, $bundle = '') { 'type' => $fieldType, 'description' => isset($field_info['description']) ? $field_info['description'] : '', 'resolve' => function ($value, $args, $context, ResolveInfo $info) use ($entity_type, $bundle, $field) { - $wrap = entity_metadata_wrapper($entity_type, $value); - if ($wrap->__isset($field)) { - $items = $wrap->{$field}->value(); - return $items; - } - return NULL; + return field_get_items($entity_type, $value, $field)[0]; } ]; }