From 5660cdfe6807c7b356cc1170be0cb5e3188c0660 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Thu, 21 Sep 2023 08:29:51 +0200 Subject: [PATCH] Ensure that all "alt_text_*" save-telemetry values are boolean (PR 16987 follow-up) Looking at the save-telemetry values they're all boolean *except* for "alt_text_edit" in one instance, since `this.#previousAltText` may be an empty string (looking at the `editAltText` method) and this value may thus become an empty string as well. --- web/alt_text_manager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/alt_text_manager.js b/web/alt_text_manager.js index 5c2734a70..c7d000e19 100644 --- a/web/alt_text_manager.js +++ b/web/alt_text_manager.js @@ -230,7 +230,7 @@ class AltTextManager { action: "alt_text_save", alt_text_description: !!altText, alt_text_edit: - this.#previousAltText && this.#previousAltText !== altText, + !!this.#previousAltText && this.#previousAltText !== altText, alt_text_decorative: decorative, alt_text_keyboard: !this.#hasUsedPointer, },