From ae06d67e9fd7e5b390ba0309049c645337b2bad8 Mon Sep 17 00:00:00 2001 From: Lordmau5 Date: Wed, 14 Aug 2019 03:52:56 +0800 Subject: [PATCH] Fix "Hide Latest Videos" (#641) Apparently we're matching a component *loader* (since there is no other way I found when finding this), so we need to make sure the props are still correct --- src/sites/twitch-twilight/modules/directory/index.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sites/twitch-twilight/modules/directory/index.jsx b/src/sites/twitch-twilight/modules/directory/index.jsx index d93f08f1..877f7438 100644 --- a/src/sites/twitch-twilight/modules/directory/index.jsx +++ b/src/sites/twitch-twilight/modules/directory/index.jsx @@ -221,6 +221,9 @@ export default class Directory extends SiteModule { this.DirectoryLatestVideos.ready(cls => { const old_render = cls.prototype.render; cls.prototype.render = function() { + if ( ! this.props || this.props.component !== 'LatestVideosFromFollowedCarousel' ) + return old_render.call(this); + try { if ( t.settings.get('directory.hide-latest-videos') ) return null; @@ -233,7 +236,7 @@ export default class Directory extends SiteModule { } this.DirectoryLatestVideos.forceUpdate(); - }) + }); this.DirectoryCard.ready((cls, instances) => { //const old_render = cls.prototype.render,