diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2016-04-04 19:50:23 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2016-04-04 19:57:24 +0900 |
commit | d694ba7ab3ea2bdf89b828c5233a36b476c9afc0 (patch) | |
tree | 4d3f0e02fb3af813fc7a3f843ae5d59d7c3ab2de | |
parent | abe83910aeaac0344b2a502ef36d748483283c28 (diff) | |
download | poe-d694ba7ab3ea2bdf89b828c5233a36b476c9afc0.tar.gz |
frontend: うまく hidden_list が設定できてなかった
-rw-r--r-- | frontend/app/snippet-detail.component.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/frontend/app/snippet-detail.component.ts b/frontend/app/snippet-detail.component.ts index de52c2b..14b2351 100644 --- a/frontend/app/snippet-detail.component.ts +++ b/frontend/app/snippet-detail.component.ts @@ -90,14 +90,14 @@ export class SnippetDetailComponent implements OnInit { } updateHiddenList() { - let list = []; + this.hidden_list = []; let prev = null; - for (let i = this.snippet.results.length - 1; i >= 0; i--) { - let curr = this.snippet.results[i]; - list.push(prev && Result.compareOutput(prev, curr)); + this.snippet.results.slice().reverse().forEach((curr, i) => { + if (prev) + this.hidden_list.push(Result.compareOutput(prev, curr)); prev = curr; - } - this.hidden_list = list.reverse(); + }); + this.hidden_list.push(false); } isHiddenIdx(i: number) { |