diff --git a/lib/utils/get-footprint-name.ts b/lib/utils/get-footprint-name.ts index e23bad2..07f1136 100644 --- a/lib/utils/get-footprint-name.ts +++ b/lib/utils/get-footprint-name.ts @@ -7,7 +7,8 @@ export function getFootprintName( if (!sourceComponent || !pcbComponent) { return "" } - const width = pcbComponent.width.toFixed(4) - const height = pcbComponent.height.toFixed(4) + const width = pcbComponent.width == null ? 0 : pcbComponent.width.toFixed(4) + const height = + pcbComponent.height == null ? 0 : pcbComponent.height.toFixed(4) return `${sourceComponent.ftype}:${width}x${height}_mm` }