diff --git a/packages/astro/src/Icon.astro b/packages/astro/src/Icon.astro index a2bacca75..01544fef5 100644 --- a/packages/astro/src/Icon.astro +++ b/packages/astro/src/Icon.astro @@ -28,7 +28,7 @@ const [, builtIconAttributes, builtIconNode = []] = buildLucideIconNode(icon, { strokeWidth, absoluteStrokeWidth, nonScalingStroke, - className, + ...(className !== undefined && { className }), hasA11yProp: hasA11yProp(rest), }); diff --git a/packages/astro/tsconfig.json b/packages/astro/tsconfig.json index 7b837db8c..2e69a2dd0 100644 --- a/packages/astro/tsconfig.json +++ b/packages/astro/tsconfig.json @@ -4,6 +4,8 @@ "module": "ESNext", "moduleResolution": "bundler", "strict": true, + "noUncheckedIndexedAccess": true, + "exactOptionalPropertyTypes": true, "useDefineForClassFields": true, "allowImportingTsExtensions": true, "resolveJsonModule": true,