From 70fc20880acaa92819aa4d09e628e9812b03bbf8 Mon Sep 17 00:00:00 2001 From: leejinho Date: Fri, 27 Dec 2019 17:45:50 +0900 Subject: [PATCH] =?UTF-8?q?=EB=8C=80=ED=99=94=EB=82=B4=EC=9A=A9=20?= =?UTF-8?q?=EA=B2=80=EC=83=89=20>=20=EB=8B=A4=EC=9D=8C=20=EA=B2=80?= =?UTF-8?q?=EC=83=89=20>=20=EB=81=9D=EA=B9=8C=EC=A7=80=20=EA=B2=80?= =?UTF-8?q?=EC=83=89=20=EC=9D=B4=ED=9B=84=EC=97=90=EB=8F=84=20=EC=88=AB?= =?UTF-8?q?=EC=9E=90=20=EC=A6=9D=EA=B0=80=20=EB=B2=84=EA=B7=B8=20=EC=88=98?= =?UTF-8?q?=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../layouts/messenger/components/messages.component.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts index 27604478..42cb7378 100644 --- a/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts +++ b/projects/ucap-webmessenger-app/src/app/layouts/messenger/components/messages.component.ts @@ -1321,9 +1321,11 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit { // } // }); - this.searchedFocusEvent = this.searchedList[this.searchCurrentIndex]; - this.searchCurrentIndex = this.searchCurrentIndex + 1; - this.goSearchPosition(this.searchedFocusEvent.seq); + if (this.searchCurrentIndex < this.searchedList.length) { + this.searchedFocusEvent = this.searchedList[this.searchCurrentIndex]; + this.searchCurrentIndex = this.searchCurrentIndex + 1; + this.goSearchPosition(this.searchedFocusEvent.seq); + } } onSearchAndPrev() { if (