1
0
mirror of https://github.com/flarum/core.git synced 2025-07-31 21:50:50 +02:00

fix(regression): newCollection accepts collections

Signed-off-by: Sami Mazouz <sychocouldy@gmail.com>
This commit is contained in:
Sami Mazouz
2023-05-15 17:31:23 +01:00
parent f6c9bbb427
commit 231cee1f78
2 changed files with 4 additions and 2 deletions

View File

@@ -47,7 +47,6 @@ class LoadMentionedByRelationship
$loadable = null;
if ($data instanceof Discussion) {
// @phpstan-ignore-next-line
$loadable = $data->newCollection($data->posts)->filter(function ($post) {
return $post instanceof Post;
});