Skip to content

Commit 6a1e895

Browse files
committed
simplification
1 parent 2c2dcc9 commit 6a1e895

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/mdx.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,9 @@ const isSupported = (
7272
let getDocsFrontMatterCache: Promise<FrontMatter[]> | undefined;
7373

7474
export function getDocsFrontMatter(): Promise<FrontMatter[]> {
75-
if (getDocsFrontMatterCache) {
76-
return getDocsFrontMatterCache;
75+
if (!getDocsFrontMatterCache) {
76+
getDocsFrontMatterCache = getDocsFrontMatterUncached();
7777
}
78-
getDocsFrontMatterCache = getDocsFrontMatterUncached();
7978
return getDocsFrontMatterCache;
8079
}
8180

0 commit comments

Comments
 (0)