Skip to content

Commit

Permalink
7TV Emotes 1.4.10
Browse files Browse the repository at this point in the history
* Fixed: Avatars potentially not loading due to a missing null check
  • Loading branch information
Lordmau5 committed Nov 20, 2023
1 parent f425b0a commit de56466
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/7tv-emotes/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main",
"clips"
],
"version": "1.4.9",
"version": "1.4.10",
"short_name": "7TV",
"name": "7TV Emotes",
"author": "Melonify",
Expand All @@ -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"
}
14 changes: 8 additions & 6 deletions src/7tv-emotes/modules/avatars.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit de56466

Please sign in to comment.