mirror of
https://github.com/Myxelium/Bridge-Multi.git
synced 2026-07-07 18:45:09 +00:00
Exclude instruments with no notes
This commit is contained in:
@@ -230,6 +230,7 @@ export class ChartSidebarComponent implements OnInit {
|
|||||||
public get instruments(): Instrument[] {
|
public get instruments(): Instrument[] {
|
||||||
if (!this.selectedChart) { return [] }
|
if (!this.selectedChart) { return [] }
|
||||||
return _.chain(this.selectedChart.notesData.noteCounts)
|
return _.chain(this.selectedChart.notesData.noteCounts)
|
||||||
|
.filter(nc => nc.count > 0)
|
||||||
.map(nc => nc.instrument)
|
.map(nc => nc.instrument)
|
||||||
.uniq()
|
.uniq()
|
||||||
.sortBy(i => instruments.indexOf(i))
|
.sortBy(i => instruments.indexOf(i))
|
||||||
|
|||||||
Reference in New Issue
Block a user