File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
src/pageEditor/tabs/editTab/editorNodeLayout Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ const EditorNodeLayout: React.FC<EditorNodeLayoutProps> = ({
114114 const activeElement = useSelector ( selectActiveElement ) ;
115115 const activeNodeId = useSelector ( selectActiveNodeId ) ;
116116 const traces = useSelector ( selectExtensionTrace ) ;
117- const pipelineMap = useSelector ( selectPipelineMap ) ;
117+ const maybePipelineMap = useSelector ( selectPipelineMap ) ;
118118 const errors = useSelector ( selectErrorMap ) ;
119119 const annotations = useSelector (
120120 selectExtensionAnnotations ( activeElement . uuid )
@@ -349,11 +349,13 @@ const EditorNodeLayout: React.FC<EditorNodeLayoutProps> = ({
349349 if ( block ) {
350350 // eslint-disable-next-line security/detect-object-injection -- relying on nodeId being a UUID
351351 const blockError = errors [ nodeId ] ;
352- const blockAnnotations = getBlockAnnotations (
353- // eslint-disable-next-line security/detect-object-injection -- relying on nodeId being a UUID
354- pipelineMap [ nodeId ] . path ,
355- annotations
356- ) ;
352+
353+ // Handle race condition on pipelineMap updates
354+ // eslint-disable-next-line security/detect-object-injection -- relying on nodeId being a UUID
355+ const blockPath = maybePipelineMap ?. [ nodeId ] ?. path ;
356+ const blockAnnotations = blockPath
357+ ? getBlockAnnotations ( blockPath , annotations )
358+ : [ ] ;
357359
358360 contentProps = {
359361 icon : < BrickIcon brick = { block } size = "2x" inheritColor /> ,
You can’t perform that action at this time.
0 commit comments