Skip to content

Commit

Permalink
Avoid null coercion to undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
igalshilman committed Oct 11, 2024
1 parent fd92190 commit 7a74e22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/restate-sdk-core/src/serde_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class JsonSerde<T> implements Serde<T | undefined> {
contentType = "application/json";

serialize(value: T): Uint8Array {
if (value == undefined) {
if (value === undefined) {
return new Uint8Array(0);
}
return new TextEncoder().encode(JSON.stringify(value));
Expand Down

0 comments on commit 7a74e22

Please sign in to comment.