mirror of
https://github.com/ascribe/onion.git
synced 2025-02-14 21:10:27 +01:00
fix minor consistence bug
This commit is contained in:
parent
b5448b0acb
commit
ada7df25a7
@ -133,9 +133,17 @@ class EditionListStore {
|
||||
}
|
||||
|
||||
onToggleEditionList(pieceId) {
|
||||
|
||||
this.isEditionListOpenForPieceId[pieceId] = {
|
||||
show: this.isEditionListOpenForPieceId[pieceId] ? !this.isEditionListOpenForPieceId[pieceId].show : true
|
||||
};
|
||||
|
||||
if(!this.isEditionListOpenForPieceId[pieceId].show) {
|
||||
// to clear an array, david walsh recommends to just set it's length to zero
|
||||
// http://davidwalsh.name/empty-array
|
||||
|
||||
this.editionList[pieceId].length = 0;
|
||||
}
|
||||
}
|
||||
|
||||
onCloseAllEditionLists() {
|
||||
|
Loading…
Reference in New Issue
Block a user