mirror of
https://github.com/ascribe/onion.git
synced 2024-06-30 13:41:57 +02:00
fix minor consistence bug
This commit is contained in:
parent
b5448b0acb
commit
ada7df25a7
|
@ -133,9 +133,17 @@ class EditionListStore {
|
||||||
}
|
}
|
||||||
|
|
||||||
onToggleEditionList(pieceId) {
|
onToggleEditionList(pieceId) {
|
||||||
|
|
||||||
this.isEditionListOpenForPieceId[pieceId] = {
|
this.isEditionListOpenForPieceId[pieceId] = {
|
||||||
show: this.isEditionListOpenForPieceId[pieceId] ? !this.isEditionListOpenForPieceId[pieceId].show : true
|
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() {
|
onCloseAllEditionLists() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user