mirror of
https://github.com/Lissy93/dashy.git
synced 2025-07-26 07:05:43 +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;
|
return this.$store.state.modalOpen;
|
||||||
},
|
},
|
||||||
pageId() {
|
pageId() {
|
||||||
return this.subPageInfo?.pageId ? this.subPageInfo.pageId : 'home';
|
return (this.subPageInfo && this.subPageInfo.pageId) ? this.subPageInfo.pageId : 'home';
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
data: () => ({
|
data: () => ({
|
||||||
|
@ -50,7 +50,7 @@ const getStartingComponent = () => {
|
|||||||
|
|
||||||
/* Returns the meta tags for each route */
|
/* Returns the meta tags for each route */
|
||||||
const makeMetaTags = (defaultTitle) => ({
|
const makeMetaTags = (defaultTitle) => ({
|
||||||
title: pageInfo?.title || defaultTitle,
|
title: pageInfo && pageInfo.title ? pageInfo.title : defaultTitle,
|
||||||
metaTags: metaTagData,
|
metaTags: metaTagData,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ export default class ConfigAccumulator {
|
|||||||
try { localPageInfo = JSON.parse(localStorage[localStorageKeys.PAGE_INFO]); }
|
try { localPageInfo = JSON.parse(localStorage[localStorageKeys.PAGE_INFO]); }
|
||||||
catch (e) { ErrorHandler('Malformed pageInfo data in local storage'); }
|
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 };
|
return { ...defaultPageInfo, ...filePageInfo, ...localPageInfo };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user