Sfoglia il codice sorgente

:bug: fixed alpha arrange scope

tags/0.9.0
J 4 anni fa
parent
commit
b8e84e8603
1 ha cambiato i file con 8 aggiunte e 5 eliminazioni
  1. 8
    5
      vue-theme/src/store/modules/artist.js

+ 8
- 5
vue-theme/src/store/modules/artist.js Vedi File

@@ -36,14 +36,17 @@ const _arrangeByMaterial = artistsList => {
36 36
 
37 37
 let seen = 0
38 38
 let hasTitle = []
39
-const storeTitle = letter => {
40
-    if(hasTitle.includes(letter)) return
41
-    flatPacked.push({ slug: letter, title: letter, inbetween: true })
42
-    hasTitle.push(letter)
43
-}
39
+
44 40
 const _arrangeByAlpha = artistsList => {
45 41
     const alphabet = [...'9abcdefghijklmnopqrstuvwxyz']
46 42
     const flatPacked = []
43
+    
44
+    const storeTitle = letter => {
45
+        if(hasTitle.includes(letter)) return
46
+        flatPacked.push({ slug: letter, title: letter, inbetween: true })
47
+        hasTitle.push(letter)
48
+    }
49
+    
47 50
     artistsList.forEach((artist, i) => {
48 51
         const lastWord = artist.slug.split('-').filter(c => c).pop()
49 52
         const firstCharaOfSortWord = artist.sortname ? artist.sortname[0] : 'z'

Loading…
Annulla
Salva