File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -291,7 +291,7 @@ const stateSelector = [
291291 '[class^="StateLabel"]' ,
292292] . join ( ',' ) ;
293293
294- export const isDraftPR = ( ) : boolean => isPR ( ) && $ ( stateSelector ) ! . textContent ! . trim ( ) === 'Draft' ;
294+ export const isDraftPR = ( ) : boolean => $ ( stateSelector ) ? .textContent ! . trim ( ) === 'Draft' ;
295295export const isOpenPR = ( ) : boolean => {
296296 if ( ! isPR ( ) ) {
297297 return false ;
@@ -302,11 +302,7 @@ export const isOpenPR = (): boolean => {
302302} ;
303303
304304export const isMergedPR = ( ) : boolean => {
305- if ( ! isPR ( ) ) {
306- return false ;
307- }
308-
309- const status = $ ( stateSelector ) ! . textContent ! . trim ( ) ;
305+ const status = $ ( stateSelector ) ?. textContent ! . trim ( ) ;
310306 return status === 'Merged' ;
311307} ;
312308
You can’t perform that action at this time.
0 commit comments