Skip to content

Commit

Permalink
Import startCase from lodash differently [#932]
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
genehack committed Aug 21, 2024
1 parent c723996 commit 9347c1e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion static-site/src/util/blogPosts.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9347c1e

Please sign in to comment.