Skip to content

armgit / dashy

Public Imported from GitHub
0

πŸš€ A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!

:bug: Adds safeguard for when pageInfo isnt specified

Alicia Sykes456cce065318
diff --git a/src/utils/ConfigAccumalator.js b/src/utils/ConfigAccumalator.js
index 1237897c..6a5e0928 100644
--- a/src/utils/ConfigAccumalator.js
+++ b/src/utils/ConfigAccumalator.js
@@ -48,11 +48,12 @@ export default class ConfigAccumulator {
} catch (e) {
localPageInfo = {};
}
+ const filePageInfo = this.conf.pageInfo || {};
const pi = this.conf.pageInfo || defaults; // The page info object to return
- pi.title = localPageInfo.title || conf.pageInfo.title || defaults.title;
- pi.description = localPageInfo.description || conf.pageInfo.description || defaults.description;
- pi.navLinks = localPageInfo.navLinks || conf.pageInfo.navLinks || defaults.navLinks;
- pi.footerText = localPageInfo.footerText || conf.pageInfo.footerText || defaults.footerText;
+ pi.title = localPageInfo.title || filePageInfo.title || defaults.title;
+ pi.description = localPageInfo.description || filePageInfo.description || defaults.description;
+ pi.navLinks = localPageInfo.navLinks || filePageInfo.navLinks || defaults.navLinks;
+ pi.footerText = localPageInfo.footerText || filePageInfo.footerText || defaults.footerText;
return pi;
}