1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-03 08:28:31 +00:00

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
This commit is contained in:
Lordmau5 2019-08-14 03:52:56 +08:00 committed by Mike
parent c39f6799d3
commit ae06d67e9f

View file

@ -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,