From 4d953f0504b0a8e0966105e9a60630b65e468898 Mon Sep 17 00:00:00 2001 From: Ansh Date: Mon, 14 Aug 2023 09:41:44 -0700 Subject: [PATCH] Fixes #1124: Trim alt text before saving (#1159) * trim alt text before setting * Drop `trim` from helpers.ts --- src/state/models/media/image.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/state/models/media/image.ts b/src/state/models/media/image.ts index e524c49d..dd5b3617 100644 --- a/src/state/models/media/image.ts +++ b/src/state/models/media/image.ts @@ -120,8 +120,8 @@ export class ImageModel implements Omit { } } - async setAltText(altText: string) { - this.altText = altText + setAltText(altText: string) { + this.altText = altText.trim() } // Only compress prior to upload