Skip to content

Commit 0277ffe

Browse files
committed
Fix build
1 parent df30449 commit 0277ffe

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

beta/src/utils/prepareMDX.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ if (typeof window !== 'undefined') {
1717
}
1818

1919
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20-
export const PREPARE_MDX_CACHE_BREAKER = 3;
20+
export const PREPARE_MDX_CACHE_BREAKER = 4;
2121
// !!! IMPORTANT !!! Bump this if you change any logic.
2222
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2323

@@ -95,10 +95,8 @@ function highlightCodeBlocksRecursively(
9595
};
9696
if (
9797
child.type === 'code' &&
98-
// @ts-ignore
99-
parentPath.at(-1) === 'pre' && // Don't highlight inline text
100-
// @ts-ignore
101-
parentPath.at(-2) !== 'Sandpack' // Interactive snippets highlight on the client
98+
parentPath[parentPath.length - 1] === 'pre' && // Don't highlight inline text
99+
parentPath[parentPath.length - 2] !== 'Sandpack' // Interactive snippets highlight on the client
102100
) {
103101
overrideProps.highlightedCode = prepareCodeBlockChildren(
104102
props.children,

0 commit comments

Comments
 (0)