From 3af65737799288354455bdf8eb348f9363c93e30 Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Sat, 11 Oct 2025 15:37:05 -0400 Subject: [PATCH] Crash fix --- CHANGELOG.md | 6 ++++++ tools/bs-plugins/logger-plugin.ts | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1e21d2b..ea6374cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Fixed + +- Crash when logging early startup warnings + ## [0.42.2] - 2025-10-09 ### Fixed diff --git a/tools/bs-plugins/logger-plugin.ts b/tools/bs-plugins/logger-plugin.ts index 0a08ead3..01626fa8 100644 --- a/tools/bs-plugins/logger-plugin.ts +++ b/tools/bs-plugins/logger-plugin.ts @@ -237,7 +237,11 @@ function ${newFunctionName}(${args.join(', ')}) as void logger.logLine = line `; if (telemetryEnabled) { - result += ` m.global.telemetry.${originalFunctionName} = line\n`; + result += ` telemetry = m.global.telemetry + if telemetry <> invalid + telemetry.${originalFunctionName} = line + end if +`; } result += `end function `;