From 9347c1e9510a3536addf9a90bc031f9d03fb54ca Mon Sep 17 00:00:00 2001 From: John SJ Anderson Date: Wed, 21 Aug 2024 13:18:15 -0700 Subject: [PATCH] Import `startCase` from `lodash` differently [#932] The previous import was complaining when run from a Node script, due to the lack of default exporting in `lodash`. This workaround avoided the error. --- static-site/src/util/blogPosts.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/static-site/src/util/blogPosts.js b/static-site/src/util/blogPosts.js index 3f2481a71..603b91490 100644 --- a/static-site/src/util/blogPosts.js +++ b/static-site/src/util/blogPosts.js @@ -2,7 +2,9 @@ import fs from 'fs'; import path from 'path'; import { fileURLToPath } from 'url'; import matter from 'gray-matter'; -import { startCase } from "lodash" +import lodash from 'lodash'; + +const { startCase } = lodash; /** * Scans the ./static-site/content/blog directory for .md files