diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2021-09-23 23:23:55 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2021-09-25 15:53:36 +0900 |
commit | b72728bdabf140c77f165b35813595dcaa060eea (patch) | |
tree | 774dc608f28101ac4a0ecce02e458e421b94dcdc /src/background/usecases | |
parent | 01242a2f0d174b4bf8b51fd5627edced465757e9 (diff) |
Create find targets by port connections
Diffstat (limited to 'src/background/usecases')
-rw-r--r-- | src/background/usecases/StartFindUseCase.ts | 11 |
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); |