File tree 1 file changed +5
-5
lines changed
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>(
41
41
42
42
// If there's no global state bound to the provider, create a new one with the
43
43
// new mutate function.
44
- const EVENT_REVALIDATORS = { }
44
+ const EVENT_REVALIDATORS = Object . create ( null )
45
45
46
46
const mutate = internalMutate . bind ( UNDEFINED , provider ) as ScopedMutator
47
47
let unmount = noop
48
48
49
49
const subscriptions : Record < string , ( ( current : any , prev : any ) => void ) [ ] > =
50
- { }
50
+ Object . create ( null )
51
51
const subscribe = (
52
52
key : string ,
53
53
callback : ( current : any , prev : any ) => void
@@ -73,9 +73,9 @@ export const initCache = <Data = any>(
73
73
// Update the state if it's new, or if the provider has been extended.
74
74
SWRGlobalState . set ( provider , [
75
75
EVENT_REVALIDATORS ,
76
- { } ,
77
- { } ,
78
- { } ,
76
+ Object . create ( null ) ,
77
+ Object . create ( null ) ,
78
+ Object . create ( null ) ,
79
79
mutate ,
80
80
setter ,
81
81
subscribe
You can’t perform that action at this time.
0 commit comments