liushengqiang %!s(int64=2) %!d(string=hai) anos
pai
achega
02c09506ee
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      src/subpages/colexiu/plugins/toggleMusicSheet/index.tsx

+ 4 - 1
src/subpages/colexiu/plugins/toggleMusicSheet/index.tsx

@@ -24,11 +24,14 @@ export default defineComponent({
       const partList = state.activeDetail?.background || []
       return partList.map((item: any, index: number) => {
         const instrumentName = getInstrumentName(item.track)
+        if (!instrumentName){
+          return ''
+        }
         return {
           text: item.track + (instrumentName ? `(${instrumentName})` : ''),
           value: index,
         }
-      })
+      }).filter(Boolean)
     })
 
     const switchMusic = (index: number) => {