fix: gracefully handle Next.js static component fetch rendering when setup configs are completely empty

This commit is contained in:
ralksta
2026-03-08 21:38:44 +01:00
parent 89bb7c0038
commit b9993bd29e
5 changed files with 19 additions and 17 deletions

View File

@@ -22,7 +22,7 @@ export function getConfig(): AppConfig {
const gallery = loadYaml<GalleryYaml>('gallery.yaml');
const settings = loadYaml<SettingsYaml>('settings.yaml') || {};
if (!gallery) {
if (!gallery || !apiKey || !apiUrl) {
// Return dummy config if gallery.yaml is missing
_config = {
immich: { apiUrl: `${apiUrl}/api`, apiKey },