Skip to content

Commit 8426237

Browse files
committed
port match fix
1 parent abe8d2b commit 8426237

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

lib/components/base-components/Renderable.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,8 @@ export abstract class Renderable implements IRenderable {
251251

252252
private _getRootRenderable(): Renderable {
253253
let node: Renderable = this
254-
while (node.parent) {
255-
node = node.parent as Renderable
254+
while (node.parent && node.parent instanceof Renderable) {
255+
node = node.parent
256256
}
257257
return node
258258
}
@@ -318,7 +318,7 @@ export abstract class Renderable implements IRenderable {
318318
const deps = asyncPhaseDependencies[phase] || []
319319
if (deps.length > 0) {
320320
const root = this._getRootRenderable()
321-
const checkNode = (root.children?.[0] as Renderable) || root
321+
const checkNode = (root.children?.[0] as any) || root
322322
for (const depPhase of deps) {
323323
if (checkNode._hasIncompleteAsyncEffectsInSubtreeForPhase?.(depPhase))
324324
return

lib/components/primitive-components/Port/Port.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,9 @@ export class Port extends PrimitiveComponent<typeof portProps> {
245245
*/
246246
registerMatch(component: PrimitiveComponent) {
247247
this.matchedComponents.push(component)
248+
if (this.renderPhaseStates.PcbPortRender.initialized && !this.pcb_port_id) {
249+
this._markDirty("PcbPortRender")
250+
}
248251
}
249252
getNameAndAliases() {
250253
const { _parsedProps: props } = this

tests/repros/__snapshots__/repro-kicad-footprint-pcbpath-selector-pcb.snap.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)