Skip to content

Commit 3e27d8e

Browse files
committed
Fix exception on missing comments
1 parent 8a8bbc4 commit 3e27d8e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,10 @@ function element(node, context) {
194194

195195
function mdxjsEsm(node, context) {
196196
var estree = node.data && node.data.estree
197+
var comments = (estree && estree.comments) || []
197198

198199
if (estree) {
199-
push.apply(context.comments, estree.comments)
200+
push.apply(context.comments, comments)
200201
attachComments(estree, estree.comments)
201202
push.apply(context.esm, estree.body)
202203
}

0 commit comments

Comments
 (0)