Fix Experiments embed patches
This commit is contained in:
parent
5dd6722528
commit
1a98d54e3a
1 changed files with 10 additions and 2 deletions
|
|
@ -116,11 +116,19 @@ export default definePlugin({
|
|||
},
|
||||
// Fix some tricky experiments name causing a client crash
|
||||
{
|
||||
match: /.getRegisteredExperiments\(\)(?<=(\i)=.+?).+?if\(null==(\i)(?=\)return null;)/,
|
||||
replace: "$&||!Object.hasOwn($1,$2)"
|
||||
match: /.getExperimentBucketName.+?if\(null==(\i)\|\|null==\i(?=\)return null;)/,
|
||||
replace: "$&||({})[$1]!=null"
|
||||
}
|
||||
]
|
||||
},
|
||||
// Fix another function which cases crashes with tricky experiment names and the experiment embed
|
||||
{
|
||||
find: "}getServerAssignment(",
|
||||
replacement: {
|
||||
match: /}getServerAssignment\((\i),\i,\i\){/,
|
||||
replace: "$&if($1==null)return;"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
start: () => !BugReporterExperiment.getCurrentConfig().hasBugReporterAccess && enableStyle(hideBugReport),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue