File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ public function entries(): array
36
36
}
37
37
38
38
// filter by current site
39
- $ entries = $ entries ->filter (self ::siteFilter (Site::current ()-> handle () ));
39
+ $ entries = $ entries ->filter (self ::siteFilter (Site::current ()));
40
40
41
41
// filter by config
42
42
if ($ excludedUrls = config ('pecotamic.sitemap.exclude_urls ' )) {
@@ -151,10 +151,11 @@ protected function publishedCollectionTerms()
151
151
});
152
152
}
153
153
154
- protected static function siteFilter ($ currentSite ): callable
154
+ protected static function siteFilter (\ Statamic \ Sites \ Site $ currentSite ): callable
155
155
{
156
- return static function ($ entry ) use ($ currentSite ) {
157
- return $ entry ->locale () === $ currentSite ;
156
+ return static function (\Statamic \Entries \Entry $ entry ) use ($ currentSite ) {
157
+ return $ entry ->redirectUrl () === null
158
+ && $ entry ->locale () === $ currentSite ->lang ();
158
159
};
159
160
}
160
161
You can’t perform that action at this time.
0 commit comments