From bfc2263c7ccb44f636d2e7156dd61dd749bc7131 Mon Sep 17 00:00:00 2001
From: Ilion Beyst <ilion.beyst@gmail.com>
Date: Wed, 23 Feb 2022 23:29:14 +0100
Subject: show match pane when a match is selected

---
 web/pw-server/src/lib/components/OutputPane.svelte | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

(limited to 'web/pw-server/src/lib/components/OutputPane.svelte')

diff --git a/web/pw-server/src/lib/components/OutputPane.svelte b/web/pw-server/src/lib/components/OutputPane.svelte
index c72a22e..4123902 100644
--- a/web/pw-server/src/lib/components/OutputPane.svelte
+++ b/web/pw-server/src/lib/components/OutputPane.svelte
@@ -1,7 +1,11 @@
 <script lang="ts">
   export let matchLog: string;
 
-  function getStdErr(log: string, botId: number): string {
+  function getStdErr(botId: number, log?: string): string {
+    if (!log) {
+      return "";
+    }
+
     let output = [];
     log
       .split("\n")
@@ -15,7 +19,7 @@
     return output.join("\n");
   }
 
-  $: botStdErr = getStdErr(matchLog, 1);
+  $: botStdErr = getStdErr(1, matchLog);
 </script>
 
 <div class="output">
-- 
cgit v1.2.3

