FakeNitro: Fix crash

This commit is contained in:
V 2023-07-10 22:39:40 +02:00
parent bea7a1711e
commit 8aea72c1be
No known key found for this signature in database
GPG Key ID: A1DC0CFB5615D905

@ -565,7 +565,11 @@ export default definePlugin({
switch (embed.type) { switch (embed.type) {
case "image": { case "image": {
if (!settings.store.transformCompoundSentence && !contentItems.includes(embed.url!) && !contentItems.includes(embed.image!.proxyURL)) return false; if (
!settings.store.transformCompoundSentence
&& !contentItems.includes(embed.url!)
&& !contentItems.includes(embed.image?.proxyURL!)
) return false;
if (settings.store.transformEmojis) { if (settings.store.transformEmojis) {
if (fakeNitroEmojiRegex.test(embed.url!)) return true; if (fakeNitroEmojiRegex.test(embed.url!)) return true;