Skip to content

Commit

Permalink
fix: invoke onCollect when ws connected
Browse files Browse the repository at this point in the history
  • Loading branch information
zxch3n committed Jun 19, 2022
1 parent 4b180f0 commit 40bdd0a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pure/watch/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ export function buildWatchClient(
log.info('WS Opened')
status.value = 'OPEN'
client.state.filesMap.clear()
client.rpc.getFiles().then(files => client.state.collectFiles(files))
client.rpc.getFiles().then((files) => {
client.state.collectFiles(files)
handlers?.onCollected?.(files)
})
client.rpc.getConfig().then(_config => config.value = _config)
})

Expand Down

0 comments on commit 40bdd0a

Please sign in to comment.