File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ const PopupLayer = (props: Props): JSX.Element | null => {
8989
9090 return (
9191 < >
92- { canCreate && canReply && reference && (
92+ { canCreate && canReply && reference && staged && (
9393 < div className = "ba-PopupLayer-popup" >
9494 < PopupReply
9595 isPending = { isPending }
Original file line number Diff line number Diff line change @@ -84,10 +84,15 @@ describe('PopupLayer', () => {
8484 expect ( wrapper . exists ( PopupReply ) ) . toBe ( false ) ;
8585 } ) ;
8686
87- test ( 'should render PopupReply if promoting a highlight' , ( ) => {
87+ test ( 'should render PopupReply if promoting a highlight and staged exists ' , ( ) => {
8888 const wrapper = getWrapper ( { mode : Mode . NONE , isPromoting : true } ) ;
8989 expect ( wrapper . exists ( PopupReply ) ) . toBe ( true ) ;
9090 } ) ;
91+
92+ test ( 'should not render PopupReply if promoting a highlight but staged does not exist' , ( ) => {
93+ const wrapper = getWrapper ( { mode : Mode . NONE , isPromoting : true , staged : null } ) ;
94+ expect ( wrapper . exists ( PopupReply ) ) . toBe ( false ) ;
95+ } ) ;
9196 } ) ;
9297
9398 describe ( 'event handlers' , ( ) => {
You can’t perform that action at this time.
0 commit comments