From 540650176ffe1b341eca83d73b16b949b0a383fd Mon Sep 17 00:00:00 2001 From: chenxsan Date: Thu, 27 May 2021 18:24:12 +0800 Subject: [PATCH] remove nullish coalescing operator --- src/utilities/content-utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utilities/content-utils.js b/src/utilities/content-utils.js index ffa7d7324d7b..3a215904b67d 100644 --- a/src/utilities/content-utils.js +++ b/src/utilities/content-utils.js @@ -82,7 +82,7 @@ export const getPageTitle = (tree, path) => { if (path.includes('/printable')) { return 'Combined printable page | webpack'; } - if (path === '/') return page.title ?? 'webpack'; + if (path === '/') return page.title || 'webpack'; return `${page.title} | webpack`; } }; @@ -92,5 +92,5 @@ export const getPageDescription = (tree, path) => { if (!page) return undefined; if (path.includes('/printable')) return ''; - return page.description ?? ''; + return page.description || ''; };