mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-29 00:14:23 -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
|
// Enable experiment embed on sent experiment links
|
||||||
{
|
{
|
||||||
find: "dev://experiment/",
|
find: "dev://experiment/",
|
||||||
replacement: {
|
replacement: [
|
||||||
|
{
|
||||||
match: /\i\.isStaff\(\)/,
|
match: /\i\.isStaff\(\)/,
|
||||||
replace: "true"
|
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