From de5646688c61e20ad238adff1e542fad8ea26d4c Mon Sep 17 00:00:00 2001 From: Lordmau5 Date: Mon, 20 Nov 2023 22:12:15 +0100 Subject: [PATCH] 7TV Emotes 1.4.10 * Fixed: Avatars potentially not loading due to a missing null check --- src/7tv-emotes/manifest.json | 4 ++-- src/7tv-emotes/modules/avatars.js | 14 ++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/7tv-emotes/manifest.json b/src/7tv-emotes/manifest.json index bcc70a6b..176fdff0 100644 --- a/src/7tv-emotes/manifest.json +++ b/src/7tv-emotes/manifest.json @@ -5,7 +5,7 @@ "main", "clips" ], - "version": "1.4.9", + "version": "1.4.10", "short_name": "7TV", "name": "7TV Emotes", "author": "Melonify", @@ -14,5 +14,5 @@ "website": "https://7tv.app", "settings": "add_ons.7tv_emotes", "created": "2021-07-12T23:18:04.000Z", - "updated": "2023-11-13T17:18:22.042Z" + "updated": "2023-11-20T21:12:16.578Z" } \ No newline at end of file diff --git a/src/7tv-emotes/modules/avatars.js b/src/7tv-emotes/modules/avatars.js index 739c2c2a..2e84c2da 100644 --- a/src/7tv-emotes/modules/avatars.js +++ b/src/7tv-emotes/modules/avatars.js @@ -173,12 +173,14 @@ export default class Avatars extends FrankerFaceZ.utilities.module.Module { // props.channelLogin is for the main channel you're watching // props.content.channelLogin is for theatre / fullscreen mode // The 'alt' attribute is a fallback - const login = parent?.props?.user?.login - || parent?.props?.targetLogin - || parent?.props?.userLogin - || parent?.props?.channelLogin - || parent?.props?.video?.owner?.login - || parent.props?.content?.channelLogin + const pprops = parent?.props; + + const login = pprops?.user?.login + || pprops?.targetLogin + || pprops?.userLogin + || pprops?.channelLogin + || pprops?.video?.owner?.login + || pprops?.content?.channelLogin || avatar.getAttribute('alt'); // No login? No avatar.