From b867fa154e3295da84b21f9715498aeda71b0008 Mon Sep 17 00:00:00 2001 From: Sebastian Bor Date: Wed, 21 Jul 2021 17:52:57 +0100 Subject: [PATCH] Explorer: Initialise instruction logs for single line system log (#18777) --- explorer/src/pages/inspector/SimulatorCard.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/explorer/src/pages/inspector/SimulatorCard.tsx b/explorer/src/pages/inspector/SimulatorCard.tsx index 18021305d5..c55194dad3 100644 --- a/explorer/src/pages/inspector/SimulatorCard.tsx +++ b/explorer/src/pages/inspector/SimulatorCard.tsx @@ -230,6 +230,13 @@ function useSimulator(message: Message) { } depth--; } else { + if (depth === 0) { + instructionLogs.push({ + logs: [], + failed: false, + }); + depth++; + } // system transactions don't start with "Program log:" instructionLogs[instructionLogs.length - 1].logs.push({ prefix: prefixBuilder(depth),