Account for undefined dependencies

master
Brad Cornes 2022-05-16 11:00:34 +01:00
parent a2b694c3e0
commit 82d0d442e8
1 changed files with 2 additions and 2 deletions

View File

@ -1474,8 +1474,8 @@ class TW {
})
capabilities.add(DidChangeWatchedFilesNotification.type, {
watchers: projects.flatMap((project) =>
project.state.dependencies.map((file) => ({ globPattern: file }))
watchers: projects.flatMap(
(project) => project.state.dependencies?.map((file) => ({ globPattern: file })) ?? []
),
})