File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
packages/swr-devtools/src Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -113,16 +113,16 @@ export const createSWRDevtools = () => {
113113 } ) ;
114114 }
115115
116- const swrdevtools : Middleware = ( useSWRNext ) => ( key , fn , config ) => {
117- // use the same React instance with the application
118- const { useLayoutEffect, useEffect, useRef } =
119- typeof window !== "undefined" &&
120- // @ts -expect-error
121- typeof window . __SWR_DEVTOOLS_REACT__ !== "undefined"
122- ? // @ts -expect-error
123- window . __SWR_DEVTOOLS_REACT__
124- : dummyHooks ;
116+ // use the same React instance with the application
117+ const { useLayoutEffect, useEffect, useRef } =
118+ typeof window !== "undefined" &&
119+ // @ts -expect-error
120+ typeof window . __SWR_DEVTOOLS_REACT__ !== "undefined"
121+ ? // @ts -expect-error
122+ window . __SWR_DEVTOOLS_REACT__
123+ : dummyHooks ;
125124
125+ const swrdevtools : Middleware = ( useSWRNext ) => ( key , fn , config ) => {
126126 useLayoutEffect ( ( ) => {
127127 window . postMessage ( { type : "initialized" } , "*" ) ;
128128 } , [ ] ) ;
You can’t perform that action at this time.
0 commit comments