Skip to content

Commit

Permalink
fix: stream callback is undefined (#1170)
Browse files Browse the repository at this point in the history
  • Loading branch information
summer-ji-eng authored Jan 21, 2022
1 parent b9f9d7e commit a693903
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/fallbackServiceStub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,10 @@ export function generateServiceStub(
(!cancelRequested ||
(err instanceof Error && err.name !== 'AbortError'))
) {
callback(err);
if (callback) {
callback(err);
}
streamArrayParser.emit('error', err);
}
}
);
Expand Down

0 comments on commit a693903

Please sign in to comment.