diff --git a/core/modules/file/src/Plugin/entity_reference/selection/FileSelection.php b/core/modules/file/src/Plugin/entity_reference/selection/FileSelection.php
index 5b642c8..dced1b1 100644
--- a/core/modules/file/src/Plugin/entity_reference/selection/FileSelection.php
+++ b/core/modules/file/src/Plugin/entity_reference/selection/FileSelection.php
@@ -28,5 +28,6 @@ class FileSelection extends SelectionBase {
   public function buildEntityQuery($match = NULL, $match_operator = 'CONTAINS') {
     $query = parent::buildEntityQuery($match, $match_operator);
     $query->condition('status', FILE_STATUS_PERMANENT);
+    return $query;
   }
 }
