Skip to content

Commit

Permalink
fix some refactor issues, support, support cadModel without board
Browse files Browse the repository at this point in the history
  • Loading branch information
seveibar committed Sep 22, 2024
1 parent 2419f24 commit 3b942a5
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/components/base-components/NormalComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ export class NormalComponent<

doInitialCadModelRender(): void {
const { db } = this.root!
const { boardThickness } = this.root!._getBoard()
const { boardThickness = 0 } = this.root?._getBoard() ?? {}
const { _parsedProps: props } = this

if (props.cadModel) {
Expand Down
2 changes: 1 addition & 1 deletion tests/components/base-components/select-methods.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { it, expect } from "bun:test"
import { Circuit } from "lib/Project"
import { Circuit } from "lib/Circuit"
import "lib/register-catalogue"

it("should correctly use selectAll and selectOne methods", () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/components/normal-components/chip-aliases.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { it, expect } from "bun:test"
import { Circuit } from "lib/Project"
import { Circuit } from "lib/Circuit"
import { Chip } from "lib/components/normal-components/Chip"
import "lib/register-catalogue"
import { getTestFixture } from "tests/fixtures/get-test-fixture"
Expand Down
2 changes: 1 addition & 1 deletion tests/components/normal-components/chip.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { it, expect } from "bun:test"
import { Circuit } from "lib/Project"
import { Circuit } from "lib/Circuit"
import { Chip } from "lib/components/normal-components/Chip"
import "lib/register-catalogue"
import { getTestFixture } from "tests/fixtures/get-test-fixture"
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/extend-expect-circuit-snapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as fs from "node:fs"
import * as path from "node:path"
import looksSame from "looks-same"
import type { AnySoupElement } from "@tscircuit/soup"
import { Circuit } from "lib/Project"
import { Circuit } from "lib/Circuit"

async function saveSnapshotOfSoup({
soup,
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/get-test-fixture.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Circuit } from "lib/Project"
import { Circuit } from "lib/Circuit"
import { logSoup } from "@tscircuit/log-soup"
import "lib/register-catalogue"
import "./extend-expect-circuit-snapshot"
Expand Down

0 comments on commit 3b942a5

Please sign in to comment.