File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -483,19 +483,21 @@ if (document.getElementById('gc-new-grant')) {
483
483
} ,
484
484
grantTagOptions ( ) {
485
485
const all_tags = this . grant_tags . sort ( ( a , b ) => b . is_eligibility_tag - a . is_eligibility_tag ) ;
486
+ const sorted_tags = this . grant_tags . sort ( ( a , b ) => a . id - b . id ) ;
486
487
const first_discovery = ( tag ) => tag . is_eligibility_tag === 0 ;
487
488
488
489
all_tags . unshift ( {
489
490
id : 0 ,
490
491
name : 'eligibility tags' . toUpperCase ( ) ,
491
492
is_eligibility_tag : 'label'
492
493
} ) ;
493
-
494
+
494
495
all_tags . splice ( all_tags . findIndex ( first_discovery ) , 0 , {
495
- id : all_tags . length + 1 ,
496
+ id : sorted_tags [ sorted_tags . length - 1 ] . id + 1 ,
496
497
name : 'discovery tags' . toUpperCase ( ) ,
497
498
is_eligibility_tag : 'label'
498
499
} ) ;
500
+
499
501
return all_tags ;
500
502
} ,
501
503
queryParams ( ) {
You can’t perform that action at this time.
0 commit comments