From b3311c6f12f06cf0600aeaab9069fccde6195e62 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Sat, 28 Oct 2023 02:19:43 +0200 Subject: [PATCH] BetterGifAltText: Fix displaying undefined --- src/plugins/betterGifAltText/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/betterGifAltText/index.ts b/src/plugins/betterGifAltText/index.ts index f07295704..8b4116318 100644 --- a/src/plugins/betterGifAltText/index.ts +++ b/src/plugins/betterGifAltText/index.ts @@ -45,7 +45,8 @@ export default definePlugin({ ], altify(props: any) { - if (props.alt && props.alt !== "GIF") return props.alt; + props.alt ??= "GIF"; + if (props.alt !== "GIF") return props.alt; let url: string = props.original || props.src; try {