about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAnsh <anshnanda10@gmail.com>2023-08-14 09:41:44 -0700
committerGitHub <noreply@github.com>2023-08-14 11:41:44 -0500
commit4d953f0504b0a8e0966105e9a60630b65e468898 (patch)
tree147f91fb021e7db5d72220c1d701e02f0368e110 /src
parent003a75fd8e3fbee4676794d89c3573331e51bb81 (diff)
downloadvoidsky-4d953f0504b0a8e0966105e9a60630b65e468898.tar.zst
Fixes #1124: Trim alt text before saving (#1159)
* trim alt text before setting

* Drop `trim` from helpers.ts
Diffstat (limited to 'src')
-rw-r--r--src/state/models/media/image.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/state/models/media/image.ts b/src/state/models/media/image.ts
index e524c49de..dd5b36170 100644
--- a/src/state/models/media/image.ts
+++ b/src/state/models/media/image.ts
@@ -120,8 +120,8 @@ export class ImageModel implements Omit<RNImage, 'size'> {
     }
   }
 
-  async setAltText(altText: string) {
-    this.altText = altText
+  setAltText(altText: string) {
+    this.altText = altText.trim()
   }
 
   // Only compress prior to upload