Skip to content

Commit

Permalink
fix: replace logical or with nullish coalescing operator
Browse files Browse the repository at this point in the history
  • Loading branch information
hollandjg committed Nov 10, 2022
1 parent 5dafe66 commit 931b1b2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/gatsby-theme-project-portal/utils/default-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ const defaultStaticText = require("./default-static-text.json")

function withDefaults(themeOptions) {
return {
siteTitle: themeOptions.siteTitle || `Gatsby Theme Project Portal`,
shortTitle: themeOptions.shortTitle || `Project Portal`,
siteTitle: themeOptions.siteTitle ?? `Gatsby Theme Project Portal`,
shortTitle: themeOptions.shortTitle ?? `Project Portal`,
faviconPath:
themeOptions.faviconPath || `${__dirname}/../images/default-icon.png`,
showDevBanner: themeOptions.showDevBanner || true,
themeOptions.faviconPath ?? `${__dirname}/../images/default-icon.png`,
showDevBanner: themeOptions.showDevBanner ?? true,
staticText: lodash.merge(defaultStaticText, themeOptions.staticText),
themeImageDirectory:
themeOptions.themeImageDirectory || "./content/theme-image",
pages: themeOptions.pages || [
themeOptions.themeImageDirectory ?? "./content/theme-image",
pages: themeOptions.pages ?? [
{
name: "Home",
link: "/",
show: true,
},
],
tailwindConfig:
themeOptions.tailwindConfig || require(`../src/styles/tailwind.presets`),
themeOptions.tailwindConfig ?? require(`../src/styles/tailwind.presets`),
// The ReCAPTCHA site key defaults to the standard example key provided by Google for the v2 recaptcha.
// If the user wants to provide NO site key, not even the default, then they can set the themeOptions:
// themeOptions: { recaptchaSiteKey: "" }
Expand Down

0 comments on commit 931b1b2

Please sign in to comment.