π A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!
Vue awesomedashboarddockerhomelabhomepagemitnodejsorganizationproductivitypwaself-hostedstartpagevue
:zap: Removes usage of nullish coalescing operator
Alicia Sykes00b872e67198
diff --git a/src/mixins/HomeMixin.js b/src/mixins/HomeMixin.jsindex 74bf984a..545f3631 100644--- a/src/mixins/HomeMixin.js+++ b/src/mixins/HomeMixin.js@@ -27,7 +27,7 @@ const HomeMixin = {return this.$store.state.modalOpen;},pageId() {- return this.subPageInfo?.pageId ? this.subPageInfo.pageId : 'home';+ return (this.subPageInfo && this.subPageInfo.pageId) ? this.subPageInfo.pageId : 'home';},},data: () => ({diff --git a/src/router.js b/src/router.jsindex bf520682..7551c9d3 100644--- a/src/router.js+++ b/src/router.js@@ -50,7 +50,7 @@ const getStartingComponent = () => {/* Returns the meta tags for each route */const makeMetaTags = (defaultTitle) => ({- title: pageInfo?.title || defaultTitle,+ title: pageInfo && pageInfo.title ? pageInfo.title : defaultTitle,metaTags: metaTagData,});diff --git a/src/utils/ConfigAccumalator.js b/src/utils/ConfigAccumalator.jsindex 3e0ab772..3c07c238 100644--- a/src/utils/ConfigAccumalator.js+++ b/src/utils/ConfigAccumalator.js@@ -60,7 +60,7 @@ export default class ConfigAccumulator {try { localPageInfo = JSON.parse(localStorage[localStorageKeys.PAGE_INFO]); }catch (e) { ErrorHandler('Malformed pageInfo data in local storage'); }}- const filePageInfo = this.conf?.pageInfo || {};+ const filePageInfo = (this.conf && this.conf.pageInfo) ? this.conf.pageInfo : {};return { ...defaultPageInfo, ...filePageInfo, ...localPageInfo };}