File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -9,15 +9,21 @@ class Sites extends StatamicSites
99{
1010 protected function getSavedSites ()
1111 {
12+ $ sites = config ('statamic.builder.sites ' );
13+
14+ if ($ sites === null ) {
15+ return parent ::getSavedSites ();
16+ }
17+
1218 return Cache::rememberForever ('statamic.builder.sites ' , function () {
13- return collect (config ('statamic.builder.sites ' ))
19+ $ sitesFromConfigFile = collect (config ('statamic.builder.sites ' ))
1420 ->mapWithKeys (function ($ site ) {
1521 $ site = new $ site ;
1622
1723 return [$ site ->handle () => $ site ->toArray ()];
18- })
19- -> toArray ()
20- ? : $ this ->getFallbackConfig ();
24+ });
25+
26+ return $ sitesFromConfigFile -> isNotEmpty () ? $ sitesFromConfigFile -> toArray () : $ this ->getFallbackConfig ();
2127 });
2228 }
2329}
You can’t perform that action at this time.
0 commit comments