Skip to content

Commit 3347302

Browse files
committed
Fix parent config
1 parent 89722cc commit 3347302

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

packages/mdx/src/mdx-client/code.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,14 @@ export function InnerCode({
3636

3737
const codeConfig = {
3838
...props.codeConfig,
39-
lineNumbers,
40-
showCopyButton,
39+
lineNumbers:
40+
lineNumbers == null
41+
? props.codeConfig?.lineNumbers
42+
: lineNumbers,
43+
showCopyButton:
44+
showCopyButton == null
45+
? props.codeConfig?.showCopyButton
46+
: showCopyButton,
4147
}
4248

4349
if (

0 commit comments

Comments
 (0)