File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -70,18 +70,22 @@ function Annotation({
70
70
return handleFindAnno ( array [ i ] , id ) ;
71
71
}
72
72
}
73
+ return '' ;
73
74
}
74
75
75
76
/**
76
77
* This useEffect allows the annotations to remain persistent when changing between root level components on the right panel
77
78
*/
78
79
useEffect ( ( ) => {
79
- const event = {
80
- target : { value : handleFindAnno ( childrenArray , id ) . annotations } ,
81
- id : id ,
80
+ const targetElement = handleFindAnno ( childrenArray , id ) ;
81
+ if ( targetElement !== '' ) {
82
+ const event = {
83
+ target : { value : targetElement . annotations } ,
84
+ id : id ,
85
+ }
86
+ console . log ( "is this a value?" , event . target . value ) ;
87
+ handleAnnoChange ( event ) ;
82
88
}
83
-
84
- handleAnnoChange ( event ) ;
85
89
} , [ state . canvasFocus ] )
86
90
87
91
const body = (
You can’t perform that action at this time.
0 commit comments