@tscircuit/core 0.0.1339 → 0.0.1340

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +12 -10
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -4899,7 +4899,7 @@ function Trace_doInitialPcbManualTraceRender(trace) {
4899
4899
  const layer = anchorPort.getAvailablePcbLayers()[0] || "top";
4900
4900
  let currentLayer = layer;
4901
4901
  const anchorPos = anchorPort._getGlobalPcbPositionAfterLayout();
4902
- const otherPos = otherPort._getGlobalPcbPositionAfterLayout();
4902
+ const otherPos = otherPort?._getGlobalPcbPositionAfterLayout();
4903
4903
  const route = [];
4904
4904
  route.push({
4905
4905
  route_type: "wire",
@@ -4975,14 +4975,16 @@ function Trace_doInitialPcbManualTraceRender(trace) {
4975
4975
  });
4976
4976
  }
4977
4977
  }
4978
- route.push({
4979
- route_type: "wire",
4980
- x: otherPos.x,
4981
- y: otherPos.y,
4982
- width,
4983
- layer: currentLayer,
4984
- end_pcb_port_id: otherPort.pcb_port_id
4985
- });
4978
+ if (otherPort && otherPos) {
4979
+ route.push({
4980
+ route_type: "wire",
4981
+ x: otherPos.x,
4982
+ y: otherPos.y,
4983
+ width,
4984
+ layer: currentLayer,
4985
+ end_pcb_port_id: otherPort.pcb_port_id
4986
+ });
4987
+ }
4986
4988
  const traceLength = getTraceLength(route);
4987
4989
  const pcb_trace = db.pcb_trace.insert({
4988
4990
  route,
@@ -24032,7 +24034,7 @@ import { identity as identity5 } from "transformation-matrix";
24032
24034
  var package_default = {
24033
24035
  name: "@tscircuit/core",
24034
24036
  type: "module",
24035
- version: "0.0.1338",
24037
+ version: "0.0.1339",
24036
24038
  types: "dist/index.d.ts",
24037
24039
  main: "dist/index.js",
24038
24040
  module: "dist/index.js",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.1339",
4
+ "version": "0.0.1340",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",