mirror of
https://github.com/mastodon/mastodon.git
synced 2026-05-27 12:12:41 -05:00
React Strict Mode (#38895)
This commit is contained in:
parent
60a437e045
commit
c47922602f
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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(<Mastodon {...props} />);
|
||||
root.render(
|
||||
<StrictMode>
|
||||
<Mastodon {...props} />
|
||||
</StrictMode>,
|
||||
);
|
||||
store.dispatch(setupBrowserNotifications());
|
||||
|
||||
if (isProduction() && me && 'serviceWorker' in navigator) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user