Skip to content

Commit

Permalink
fix(misc): @nx/web:file-server should not error on destructuring null (
Browse files Browse the repository at this point in the history
  • Loading branch information
AgentEnder committed Nov 17, 2023
1 parent aa4fbd7 commit 2a5d541
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/web/src/executors/file-server/file-server.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ function createFileWatcher(
includeGlobalWorkspaceFiles: true,
includeDependentProjects: true,
},
async (error, { changedFiles }) => {
async (error, val) => {
if (error === 'closed') {
throw new Error('Watch error: Daemon closed the connection');
} else if (error) {
throw new Error(`Watch error: ${error?.message ?? 'Unknown'}`);
} else if (changedFiles.length > 0) {
} else if (val?.changedFiles.length > 0) {
changeHandler();
}
}
Expand Down

0 comments on commit 2a5d541

Please sign in to comment.