[Glitch] React Strict Mode
Port c47922602ff43562ebe687bcbef23d43b301b18f to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
f532c9f179
commit
9d382bca09
@ -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…
x
Reference in New Issue
Block a user