mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-28 16:04:24 -04:00
Experiments: Fix client crash with new experiment embed
This commit is contained in:
parent
15fa0ff7a7
commit
578aa5f107
1 changed files with 11 additions and 4 deletions
|
@ -109,10 +109,17 @@ export default definePlugin({
|
|||
// Enable experiment embed on sent experiment links
|
||||
{
|
||||
find: "dev://experiment/",
|
||||
replacement: {
|
||||
match: /\i\.isStaff\(\)/,
|
||||
replace: "true"
|
||||
}
|
||||
replacement: [
|
||||
{
|
||||
match: /\i\.isStaff\(\)/,
|
||||
replace: "true"
|
||||
},
|
||||
// Fix some tricky experiments name causing a client crash
|
||||
{
|
||||
match: /.getRegisteredExperiments\(\)(?<=(\i)=.+?).+?if\(null==(\i)(?=\)return null;)/,
|
||||
replace: "$&||!Object.hasOwn($1,$2)"
|
||||
}
|
||||
]
|
||||
},
|
||||
],
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue