]> BookStack Code Mirror - bookstack/blobdiff - app/Actions/TagRepo.php
Fixed click issue with tag suggestions in safari
[bookstack] / app / Actions / TagRepo.php
index cece30de003b3a48b0d72f2d0e30b28e7dfa828e..13d1d957e962f21237e80451fdcffe7cfa448175 100644 (file)
@@ -11,11 +11,9 @@ use Illuminate\Support\Facades\DB;
 
 class TagRepo
 {
-    protected PermissionApplicator $permissions;
-
-    public function __construct(PermissionApplicator $permissions)
-    {
-        $this->permissions = $permissions;
+    public function __construct(
+        protected PermissionApplicator $permissions
+    ) {
     }
 
     /**
@@ -90,6 +88,7 @@ class TagRepo
     {
         $query = Tag::query()
             ->select('*', DB::raw('count(*) as count'))
+            ->where('value', '!=', '')
             ->groupBy('value');
 
         if ($searchTerm) {