summaryrefslogtreecommitdiff
path: root/packages/integrations/mdx/src/remark-images-to-component.ts
diff options
context:
space:
mode:
authorGravatar Bjorn Lu <bjornlu.dev@gmail.com> 2023-11-21 12:09:19 +0800
committerGravatar GitHub <noreply@github.com> 2023-11-21 12:09:19 +0800
commitabf601233f8188d118a8cb063c777478d8d9f1a3 (patch)
tree357fc25bc46528a4420b098b33caf062ae0d4af0 /packages/integrations/mdx/src/remark-images-to-component.ts
parent6201bbe96c2a083fb201e4a43a9bd88499821a3e (diff)
downloadastro-abf601233f8188d118a8cb063c777478d8d9f1a3.tar.gz
astro-abf601233f8188d118a8cb063c777478d8d9f1a3.tar.zst
astro-abf601233f8188d118a8cb063c777478d8d9f1a3.zip
Update all dependencies (#9138)
Co-authored-by: delucis <delucis@users.noreply.github.com>
Diffstat (limited to 'packages/integrations/mdx/src/remark-images-to-component.ts')
-rw-r--r--packages/integrations/mdx/src/remark-images-to-component.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/integrations/mdx/src/remark-images-to-component.ts b/packages/integrations/mdx/src/remark-images-to-component.ts
index f83f5d76a..810056def 100644
--- a/packages/integrations/mdx/src/remark-images-to-component.ts
+++ b/packages/integrations/mdx/src/remark-images-to-component.ts
@@ -15,7 +15,7 @@ export function remarkImageToComponent() {
const importsStatements: MdxjsEsm[] = [];
const importedImages = new Map<string, string>();
- visit(tree, 'image', (node: Image, index: number | null, parent: Parent | null) => {
+ visit(tree, 'image', (node: Image, index: number | undefined, parent: Parent | null) => {
// Use the imagePaths set from the remark-collect-images so we don't have to duplicate the logic for
// checking if an image should be imported or not
if (file.data.imagePaths?.has(node.url)) {