Browse Source

Update StatusHashtagService, fix null status bug

Daniel Supernault 4 years ago
parent
commit
51a277e1ae
1 changed files with 4 additions and 1 deletions
  1. 4 1
      app/Services/StatusHashtagService.php

+ 4 - 1
app/Services/StatusHashtagService.php

@@ -30,6 +30,9 @@ class StatusHashtagService {
 			->map(function ($i, $k) use ($id) {
 			->map(function ($i, $k) use ($id) {
 				return self::getStatus($i, $id);
 				return self::getStatus($i, $id);
 			})
 			})
+			->filter(function ($i) {
+				return isset($i['status']) && !empty($i['status']);
+			})
 			->all();
 			->all();
 	}
 	}
 
 
@@ -72,4 +75,4 @@ class StatusHashtagService {
 	{
 	{
 		return ['status' => StatusService::get($statusId)];
 		return ['status' => StatusService::get($statusId)];
 	}
 	}
-}
+}