From a0642ab081cebcb54566a8fdd743b36e504aa809 Mon Sep 17 00:00:00 2001 From: Nicolas Dextraze Date: Sat, 27 Oct 2018 15:50:11 -0700 Subject: [PATCH] Re-add optional (allowing null) on ResolvedEvent event property in protobuf --- src/messages/messages.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/messages/messages.js b/src/messages/messages.js index 81ab70b..6e2e6f3 100644 --- a/src/messages/messages.js +++ b/src/messages/messages.js @@ -841,7 +841,6 @@ if (!(reader instanceof $Reader)) reader = $Reader.create(reader); var end = length === undefined ? reader.len : reader.pos + length, message = new $root.EventStore.Client.Messages.ResolvedIndexedEvent(); - message.event = null; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -856,8 +855,8 @@ break; } } - if (!message.hasOwnProperty("event")) - throw $util.ProtocolError("missing required 'event'", { instance: message }); + //if (!message.hasOwnProperty("event")) + // throw $util.ProtocolError("missing required 'event'", { instance: message }); return message; }; @@ -1082,8 +1081,8 @@ break; } } - if (!message.hasOwnProperty("event")) - throw $util.ProtocolError("missing required 'event'", { instance: message }); + //if (!message.hasOwnProperty("event")) + // throw $util.ProtocolError("missing required 'event'", { instance: message }); if (!message.hasOwnProperty("commitPosition")) throw $util.ProtocolError("missing required 'commitPosition'", { instance: message }); if (!message.hasOwnProperty("preparePosition"))