File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -41,13 +41,13 @@ export const initCache = <Data = any>(
4141
4242 // If there's no global state bound to the provider, create a new one with the
4343 // new mutate function.
44- const EVENT_REVALIDATORS = { }
44+ const EVENT_REVALIDATORS = Object . create ( null )
4545
4646 const mutate = internalMutate . bind ( UNDEFINED , provider ) as ScopedMutator
4747 let unmount = noop
4848
4949 const subscriptions : Record < string , ( ( current : any , prev : any ) => void ) [ ] > =
50- { }
50+ Object . create ( null )
5151 const subscribe = (
5252 key : string ,
5353 callback : ( current : any , prev : any ) => void
@@ -73,9 +73,9 @@ export const initCache = <Data = any>(
7373 // Update the state if it's new, or if the provider has been extended.
7474 SWRGlobalState . set ( provider , [
7575 EVENT_REVALIDATORS ,
76- { } ,
77- { } ,
78- { } ,
76+ Object . create ( null ) ,
77+ Object . create ( null ) ,
78+ Object . create ( null ) ,
7979 mutate ,
8080 setter ,
8181 subscribe
You can’t perform that action at this time.
0 commit comments