fix: fix bugs
This commit is contained in:
		@@ -9,7 +9,7 @@ export const useContext = (initContext?: GlobalContext) => {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const useContextKey = <T>(key: string, init: () => T): T => {
 | 
					export const useContextKey = <T>(key: string, init: () => T): T => {
 | 
				
			||||||
  const _context = useContext();
 | 
					  const _context = useContext({});
 | 
				
			||||||
  if (key && init) {
 | 
					  if (key && init) {
 | 
				
			||||||
    _context[key] = init();
 | 
					    _context[key] = init();
 | 
				
			||||||
    return _context[key] as any;
 | 
					    return _context[key] as any;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user