Skip to content

Commit 209552b

Browse files
authored
remove nullish coalescing operator (#5025)
1 parent 66cf58e commit 209552b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utilities/content-utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export const getPageTitle = (tree, path) => {
8282
if (path.includes('/printable')) {
8383
return 'Combined printable page | webpack';
8484
}
85-
if (path === '/') return page.title ?? 'webpack';
85+
if (path === '/') return page.title || 'webpack';
8686
return `${page.title} | webpack`;
8787
}
8888
};
@@ -92,5 +92,5 @@ export const getPageDescription = (tree, path) => {
9292
if (!page) return undefined;
9393
if (path.includes('/printable')) return '';
9494

95-
return page.description ?? '';
95+
return page.description || '';
9696
};

0 commit comments

Comments
 (0)