@@ -193,16 +193,16 @@ export class Block {
193193 }
194194 }
195195
196- addChild ( blockSignal : MaybeSignal < Block > , position ?: number ) : void {
197- const block = getValue ( blockSignal ) ;
198- block . parent = this ;
196+ addChild ( block : MaybeSignal < Block > , position ?: number ) : void {
197+ const blockValue = getValue ( block ) ;
198+ blockValue . parent = this ;
199199 this . children ??= [ ] ;
200200 if ( typeof position === "number" ) {
201- this . children . splice ( position , 0 , blockSignal ) ;
201+ this . children . splice ( position , 0 , block ) ;
202202 } else {
203- this . children . push ( blockSignal ) ;
203+ this . children . push ( block ) ;
204204 }
205- block . mount ( ) ;
205+ blockValue . mount ( ) ;
206206 this . changed = true ;
207207 }
208208
@@ -216,12 +216,12 @@ export class Block {
216216 this . changed = true ;
217217 }
218218
219- removeChild ( blockSignal : MaybeSignal < Block > ) : void {
220- const block = getValue ( blockSignal ) ;
221- block . parent = undefined ;
222- block . unmount ( ) ;
219+ removeChild ( block : MaybeSignal < Block > ) : void {
220+ const blockValue = getValue ( block ) ;
221+ blockValue . parent = undefined ;
222+ blockValue . unmount ( ) ;
223223
224- const index = this . children ?. findIndex ( ( value ) => value === block || value === blockSignal ) ;
224+ const index = this . children ?. findIndex ( ( value ) => value === blockValue || value === block ) ;
225225 if ( typeof index !== "number" || index === - 1 ) return ;
226226
227227 this . children ! . splice ( index , 1 ) ;
0 commit comments