From c0a790fd4f618b9841e4c439d1fa5a82f6c321d8 Mon Sep 17 00:00:00 2001 From: Josep M Sobrepere Date: Mon, 13 Mar 2023 21:41:54 +0100 Subject: [PATCH] WIP --- package-lock.json | 2 +- packages/context-state/src/subinstance.ts | 17 +++-------------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5ffc949..b116f95 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "re-rxjs", + "name": "react-rxjs", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/context-state/src/subinstance.ts b/packages/context-state/src/subinstance.ts index 427dc8b..4222303 100644 --- a/packages/context-state/src/subinstance.ts +++ b/packages/context-state/src/subinstance.ts @@ -158,9 +158,6 @@ export const subinstance = < ctxFn: InstanceKeysCtxFn, ) => { const internalInnerParent = getInternals(parent) - const missingKeyIdx = internalParent.keysOrder.findIndex( - (val, idx) => internalInnerParent.keysOrder[idx] !== val, - ) const idsGenerator = detachedNode( internalInnerParent.keysOrder, @@ -168,17 +165,9 @@ export const subinstance = < () => false, ) - const idsNotificator: RunFn = - missingKeyIdx === -1 - ? (key, isActive, isParentLoaded, ids) => { - idsRun( - internalInnerParent, - key, - isActive && isParentLoaded ? ids : [], - ) - } - : () => {} - idsGenerator.childRunners.push(idsNotificator) + idsGenerator.childRunners.push((key, isActive, isParentLoaded, ids) => { + idsRun(internalInnerParent, key, isActive && isParentLoaded ? ids : []) + }) } internalParent.childRunners.push(result.run)