From c47922602ff43562ebe687bcbef23d43b301b18f Mon Sep 17 00:00:00 2001 From: Echo Date: Thu, 7 May 2026 12:03:08 +0200 Subject: [PATCH] React Strict Mode (#38895) --- .../features/ui/util/intersection_observer_wrapper.js | 2 +- app/javascript/mastodon/main.tsx | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/javascript/mastodon/features/ui/util/intersection_observer_wrapper.js b/app/javascript/mastodon/features/ui/util/intersection_observer_wrapper.js index 2b24c65831d..456bde11b56 100644 --- a/app/javascript/mastodon/features/ui/util/intersection_observer_wrapper.js +++ b/app/javascript/mastodon/features/ui/util/intersection_observer_wrapper.js @@ -25,7 +25,7 @@ class IntersectionObserverWrapper { this.observerBacklog.forEach(([ id, node, callback ]) => { this.observe(id, node, callback); }); - this.observerBacklog = null; + this.observerBacklog = []; } observe (id, node, callback) { diff --git a/app/javascript/mastodon/main.tsx b/app/javascript/mastodon/main.tsx index 965645f9e69..ccefd7f366d 100644 --- a/app/javascript/mastodon/main.tsx +++ b/app/javascript/mastodon/main.tsx @@ -1,3 +1,4 @@ +import { StrictMode } from 'react'; import { createRoot } from 'react-dom/client'; import { Globals } from '@react-spring/web'; @@ -33,7 +34,11 @@ function main() { await initializeEmoji(); const root = createRoot(mountNode); - root.render(); + root.render( + + + , + ); store.dispatch(setupBrowserNotifications()); if (isProduction() && me && 'serviceWorker' in navigator) {