Skip to content

Commit bcf2920

Browse files
committed
fix: ensure once
1 parent 52aa8be commit bcf2920

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/common/refresh-runtime.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,9 @@ function collectCustomHooksForSignature(type) {
314314
}
315315

316316
export function injectIntoGlobalHook(globalObject) {
317+
if (globalObject.__vite_plugin_react_injectIntoGlobalHook) return
318+
globalObject.__vite_plugin_react_injectIntoGlobalHook = true
319+
317320
// For React Native, the global hook will be set up by require('react-devtools-core').
318321
// That code will run before us. So we need to monkeypatch functions on existing hook.
319322

0 commit comments

Comments
 (0)