From 82d0d442e8ffde19629ce5bae977a65f5f3b8078 Mon Sep 17 00:00:00 2001 From: Brad Cornes Date: Mon, 16 May 2022 11:00:34 +0100 Subject: [PATCH] Account for undefined dependencies --- packages/tailwindcss-language-server/src/server.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/tailwindcss-language-server/src/server.ts b/packages/tailwindcss-language-server/src/server.ts index 615fd95..d25729e 100644 --- a/packages/tailwindcss-language-server/src/server.ts +++ b/packages/tailwindcss-language-server/src/server.ts @@ -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 })) ?? [] ), })