Skip to content

Commit

Permalink
fix: check for udnefined as well as null in payload.metadata
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Viglucci <kviglucci@gmail.com>
  • Loading branch information
viglucci committed Jan 5, 2022
1 parent d0e13a8 commit 639a967
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/rsocket-core/src/RSocketMachine.js
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,8 @@ class RSocketMachineImpl<D, M> implements RSocketMachine<D, M> {
flags |= FLAGS.COMPLETE;
this._subscriptions.delete(streamId);
}
if (payload.metadata !== undefined) {
if (payload.metadata !== undefined &&
payload.metadata !== null) {
// eslint-disable-next-line no-bitwise
flags |= FLAGS.METADATA;
}
Expand Down

0 comments on commit 639a967

Please # to comment.