mirror of
https://github.com/Lissy93/dashy.git
synced 2025-04-08 17:06:18 +02:00
⚡ Removes usage of nullish coalescing operator
This commit is contained in:
parent
7e547e7463
commit
00b872e671
@ -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: () => ({
|
||||
|
@ -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,
|
||||
});
|
||||
|
||||
|
@ -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 };
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user