From 39a1fb3ffe57f59cfe88e6d428d23a82d680d270 Mon Sep 17 00:00:00 2001 From: Kevin Viglucci Date: Mon, 3 Jan 2022 09:44:44 -0600 Subject: [PATCH] fix: check for udnefined as well as null in payload.metadata --- packages/rsocket-core/src/RSocketMachine.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/rsocket-core/src/RSocketMachine.js b/packages/rsocket-core/src/RSocketMachine.js index ae545bcc..02bbb3cc 100644 --- a/packages/rsocket-core/src/RSocketMachine.js +++ b/packages/rsocket-core/src/RSocketMachine.js @@ -888,7 +888,8 @@ class RSocketMachineImpl implements RSocketMachine { 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; }