1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-07-06 11:08:30 +00:00

4.0.0-rc8.3

* Fixed: Users mentioning themselves in Chat on Videos and Clips Chat appearing to highlight the user.
* Fixed: Attempting to read Twitch experiment state from an uninitialized controller.
This commit is contained in:
SirStendec 2018-07-22 17:04:10 -04:00
parent 5ffeb71ba7
commit 2508a6c025
4 changed files with 24 additions and 5 deletions

View file

@ -177,10 +177,20 @@ export default class ExperimentManager extends Module {
const core = this.resolve('site').getCore(),
exps = core && core.experiments;
if ( exps && exps.overrides[key] )
if ( ! exps )
return null;
if ( ! exps.hasInitialized && exps.initialize )
try {
exps.initialize();
} catch(err) {
this.log.warn('Error attempting to initialize Twitch experiments tracker.', err);
}
if ( exps.overrides && exps.overrides[key] )
return exps.overrides[key];
else if ( exps && exps.assignments[key] )
else if ( exps.assignments && exps.assignments[key] )
return exps.assignments[key];
return null;