1
0
mirror of https://github.com/ascribe/onion.git synced 2024-06-28 00:28:00 +02:00

fix minor consistence bug

This commit is contained in:
Tim Daubenschütz 2015-08-07 13:18:33 +02:00
parent b5448b0acb
commit ada7df25a7

View File

@ -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() {