From 1ba9bee0c7c6c359fb2bdf78cc24e92ef694bfb9 Mon Sep 17 00:00:00 2001 From: Arafat Nalkhande Date: Fri, 12 Jul 2024 21:42:02 +0530 Subject: [PATCH] Fix for SharedTree op named idAllocation --- .../tools/fetch-tool/src/fluidAnalyzeMessages.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/tools/fetch-tool/src/fluidAnalyzeMessages.ts b/packages/tools/fetch-tool/src/fluidAnalyzeMessages.ts index 839dc93e6e86..4c8c356de091 100644 --- a/packages/tools/fetch-tool/src/fluidAnalyzeMessages.ts +++ b/packages/tools/fetch-tool/src/fluidAnalyzeMessages.ts @@ -607,8 +607,8 @@ function processOp( type: string; }; const address = envelope.address; - type = `${type}/${innerContent.type}`; - switch (innerContent.type) { + type = `${type}/${innerContent?.type}`; + switch (innerContent?.type) { case DataStoreMessageType.Attach: { const attachMessage = innerContent.content as IAttachMessage; let objectType = attachMessage.type; @@ -620,13 +620,13 @@ function processOp( } case DataStoreMessageType.ChannelOp: default: { - const innerEnvelope = innerContent.content as IEnvelope; - const innerContent2 = innerEnvelope.contents as { + const innerEnvelope = innerContent?.content as IEnvelope; + const innerContent2 = innerEnvelope?.contents as { type?: string; value?: any; }; - const objectId = getObjectId(address, innerEnvelope.address); + const objectId = getObjectId(address, innerEnvelope?.address); incr(objectStats, objectId, totalMsgSize, opCount); let objectType = dataType.get(objectId); if (objectType === undefined) { @@ -637,9 +637,9 @@ function processOp( incr(dataTypeStats, objectType, totalMsgSize, opCount); recorded = true; - let subType = innerContent2.type; + let subType = innerContent2?.type; if ( - innerContent2.type === "set" && + innerContent2?.type === "set" && typeof innerContent2.value === "object" && innerContent2.value !== null ) {