From 1ffaae04cf790390f730bf900b9722b99642adc1 Mon Sep 17 00:00:00 2001 From: Stephan de Vries Date: Mon, 26 Aug 2024 15:28:16 +0200 Subject: [PATCH] Fix typo in `MissingImageDimension` error message (#11842) * Fix typo in `MissingImageDimension` error message * Update .changeset/perfect-socks-dress.md --------- Co-authored-by: Emanuele Stoppa --- .changeset/perfect-socks-dress.md | 5 +++++ packages/astro/src/core/errors/errors-data.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/perfect-socks-dress.md diff --git a/.changeset/perfect-socks-dress.md b/.changeset/perfect-socks-dress.md new file mode 100644 index 000000000000..a6c8a8402400 --- /dev/null +++ b/.changeset/perfect-socks-dress.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fixes a typo in the `MissingImageDimension` error message diff --git a/packages/astro/src/core/errors/errors-data.ts b/packages/astro/src/core/errors/errors-data.ts index d16cfdd969e3..ad64adb4af54 100644 --- a/packages/astro/src/core/errors/errors-data.ts +++ b/packages/astro/src/core/errors/errors-data.ts @@ -541,7 +541,7 @@ export const MissingImageDimension = { message: (missingDimension: 'width' | 'height' | 'both', imageURL: string) => `Missing ${ missingDimension === 'both' ? 'width and height attributes' : `${missingDimension} attribute` - } for ${imageURL}. When using remote images, both dimensions are required unless in order to avoid CLS.`, + } for ${imageURL}. When using remote images, both dimensions are required in order to avoid CLS.`, hint: 'If your image is inside your `src` folder, you probably meant to import it instead. See [the Imports guide for more information](https://docs.astro.build/en/guides/imports/#other-assets). You can also use `inferSize={true}` for remote images to get the original dimensions.', } satisfies ErrorData; /**