Skip to content

Commit 639a967

Browse files
committed
fix: check for udnefined as well as null in payload.metadata
Signed-off-by: Kevin Viglucci <kviglucci@gmail.com>
1 parent d0e13a8 commit 639a967

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/rsocket-core/src/RSocketMachine.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,8 @@ class RSocketMachineImpl<D, M> implements RSocketMachine<D, M> {
888888
flags |= FLAGS.COMPLETE;
889889
this._subscriptions.delete(streamId);
890890
}
891-
if (payload.metadata !== undefined) {
891+
if (payload.metadata !== undefined &&
892+
payload.metadata !== null) {
892893
// eslint-disable-next-line no-bitwise
893894
flags |= FLAGS.METADATA;
894895
}

0 commit comments

Comments
 (0)