Skip to content

Commit 4857c63

Browse files
committed
grpc-js: simplify ServerReadableStream's deserialize()
This commit removes null and undefined checks from deserialize().
1 parent e0a3090 commit 4857c63

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

packages/grpc-js/src/server-call.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,7 @@ export class ServerReadableStreamImpl<RequestType, ResponseType> extends
115115
this.call.resume();
116116
}
117117

118-
deserialize(input: Buffer): RequestType|null {
119-
if (input === null || input === undefined) {
120-
return null;
121-
}
122-
118+
deserialize(input: Buffer): RequestType {
123119
return this._deserialize(input);
124120
}
125121

0 commit comments

Comments
 (0)