aboutsummaryrefslogtreecommitdiff
path: root/src/background/usecases
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2021-09-23 23:23:55 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2021-09-25 15:53:36 +0900
commitb72728bdabf140c77f165b35813595dcaa060eea (patch)
tree774dc608f28101ac4a0ecce02e458e421b94dcdc /src/background/usecases
parent01242a2f0d174b4bf8b51fd5627edced465757e9 (diff)
Create find targets by port connections
Diffstat (limited to 'src/background/usecases')
-rw-r--r--src/background/usecases/StartFindUseCase.ts11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/background/usecases/StartFindUseCase.ts b/src/background/usecases/StartFindUseCase.ts
index a62462f..6aad962 100644
--- a/src/background/usecases/StartFindUseCase.ts
+++ b/src/background/usecases/StartFindUseCase.ts
@@ -40,16 +40,11 @@ export default class StartFindUseCase {
await this.findClient.clearSelection(tabId, frameId);
}
- for (let framePos = 0; framePos < frameIds.length; ++framePos) {
- const found = await this.findClient.findNext(
- tabId,
- frameIds[framePos],
- keyword
- );
+ for (const frameId of frameIds) {
+ const found = await this.findClient.findNext(tabId, frameId, keyword);
if (found) {
await this.findRepository.setLocalState(tabId, {
- frameIds,
- framePos,
+ frameId,
keyword,
});
await this.consoleClient.showInfo(tabId, "Pattern found: " + keyword);