File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -482,8 +482,9 @@ if (document.getElementById('gc-new-grant')) {
482
482
return this . submitted && this . step === this . currentSteps . length && Object . keys ( this . errors ) . length === 0 ;
483
483
} ,
484
484
grantTagOptions ( ) {
485
- const all_tags = this . grant_tags . sort ( ( a , b ) => b . is_eligibility_tag - a . is_eligibility_tag ) ;
486
485
const sorted_tags = this . grant_tags . sort ( ( a , b ) => a . id - b . id ) ;
486
+ const next_id = sorted_tags [ sorted_tags . length - 1 ] . id + 1 ;
487
+ const all_tags = this . grant_tags . sort ( ( a , b ) => b . is_eligibility_tag - a . is_eligibility_tag ) ;
487
488
const first_discovery = ( tag ) => tag . is_eligibility_tag === 0 ;
488
489
489
490
all_tags . unshift ( {
@@ -493,7 +494,7 @@ if (document.getElementById('gc-new-grant')) {
493
494
} ) ;
494
495
495
496
all_tags . splice ( all_tags . findIndex ( first_discovery ) , 0 , {
496
- id : sorted_tags [ sorted_tags . length - 1 ] . id + 1 ,
497
+ id : next_id ,
497
498
name : 'discovery tags' . toUpperCase ( ) ,
498
499
is_eligibility_tag : 'label'
499
500
} ) ;
You can’t perform that action at this time.
0 commit comments