File tree Expand file tree Collapse file tree
packages/debugger/src/structure Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,13 +58,14 @@ export function createStructure<TEl extends object>(props: {
5858 let shouldUpdateAllRoots = true
5959
6060 const onComputationUpdate : walker . ComputationUpdateHandler = (
61- rootId , owner , changedStructure ,
61+ root_id , owner , changed_structure ,
6262 ) => {
6363 // separate the callback from the computation
6464 queueMicrotask ( ( ) => {
6565 if ( ! props . enabled ( ) ) return
66- if ( changedStructure ) {
67- updateOwner ( owner , rootId )
66+ if ( changed_structure ) {
67+ let owner_to_update = getClosestIncludedOwner ( owner , treeWalkerMode ) ?? owner
68+ updateOwner ( owner_to_update , root_id )
6869 }
6970 let id = getSdtId ( owner , ObjectType . Owner )
7071 props . onNodeUpdate ( id )
Original file line number Diff line number Diff line change @@ -214,9 +214,9 @@ const findComponent = <TEl extends object>(
214214
215215export
216216type ComputationUpdateHandler = (
217- rootId : NodeID ,
218- owner : Solid . Owner ,
219- changedStructure : boolean ,
217+ rootId : NodeID ,
218+ owner : Solid . Owner ,
219+ changed_structure : boolean ,
220220) => void
221221
222222export
@@ -244,7 +244,7 @@ function observeComputation<TEl extends object>(
244244 // copy values in case config gets mutated
245245 let { rootId, onUpdate : onComputationUpdate , mode} = config
246246
247- const handler = ( ) => {
247+ let handler = ( ) => {
248248 let is_leaf = ! comp . owned || comp . owned . length === 0
249249 let changed_structure = was_leaf !== is_leaf || ! is_leaf || mode === TreeWalkerMode . DOM
250250 was_leaf = is_leaf
You can’t perform that action at this time.
0 commit comments