File tree Expand file tree Collapse file tree 1 file changed +3
-14
lines changed
Expand file tree Collapse file tree 1 file changed +3
-14
lines changed Original file line number Diff line number Diff line change @@ -79,20 +79,9 @@ const resourceOptions = computed(() => {
7979 children: resources .all
8080 .filter ((r ) => r .textId === tId )
8181 .filter ((r ) => r .config .general .searchableAdv )
82- .sort ((a , b ) => {
83- const categories =
84- state .pf ?.texts .find ((t ) => t .id === a .textId )?.resourceCategories ?.map ((c ) => c .key ) ||
85- [];
86- const catA = categories .includes (a .config .general .category || ' ' )
87- ? categories .indexOf (a .config .general .category || ' ' )
88- : 99 ;
89- const catB = categories .includes (b .config .general .category || ' ' )
90- ? categories .indexOf (b .config .general .category || ' ' )
91- : 99 ;
92- const soA = a .config .general .sortOrder || 99 ;
93- const soB = b .config .general .sortOrder || 99 ;
94- return catA * 100 + soA - (catB * 100 + soB );
95- })
82+ .sort ((a , b ) =>
83+ pickTranslation (a .title , state .locale ).localeCompare (pickTranslation (b .title , state .locale ))
84+ )
9685 .map ((r ) => ({
9786 label: pickTranslation (r .title , state .locale ),
9887 value: r .id ,
You can’t perform that action at this time.
0 commit comments