All files / app/codeCharta/state/selectors selectedNode.selector.ts

100% Statements 5/5
75% Branches 3/4
100% Functions 1/1
100% Lines 5/5

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 821x 21x 21x   21x 1x    
import { createSelector } from "@ngrx/store"
import { selectedBuildingIdSelector } from "../store/appStatus/selectedBuildingId/selectedBuildingId.selector"
import { idToNodeSelector } from "./accumulatedData/idToNode.selector"
 
export const selectedNodeSelector = createSelector(selectedBuildingIdSelector, idToNodeSelector, (selectedBuildingId, idToNode) =>
    idToNode?.get(selectedBuildingId)
)