From 12ce0c5c2c3f33f946d89401eb7575991baf2f34 Mon Sep 17 00:00:00 2001 From: sadan <117494111+sadan4@users.noreply.github.com> Date: Wed, 4 Feb 2026 17:42:47 -0500 Subject: [PATCH] experiments: fix patch --- src/plugins/experiments/index.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/experiments/index.tsx b/src/plugins/experiments/index.tsx index cb456fc78..34de1df90 100644 --- a/src/plugins/experiments/index.tsx +++ b/src/plugins/experiments/index.tsx @@ -106,10 +106,11 @@ export default definePlugin({ }, // Enable experiment embed on sent experiment links { - find: '"Clear Treatment "', + find: "`Clear Treatment ${", replacement: [ { - match: /\i\.isStaff\(\)/, + // TODO: stable compat optional chaining remove once some time has passed + match: /\i\??\.isStaff\(\)/, replace: "true" }, // Fix some tricky experiments name causing a client crash