Skip to content

Commit b2c6fbc

Browse files
committed
Size limit test
1 parent 79a01d5 commit b2c6fbc

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

packages/query-devtools/src/contexts/DevtoolsStateContext.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,5 @@ export interface DevtoolsState {
3737
export const DevtoolsStateContext = createContext<DevtoolsState>()
3838

3939
export function useDevtoolsState() {
40-
const context = useContext(DevtoolsStateContext)
41-
if (!context) {
42-
throw new Error('useDevtoolsState must be used within DevtoolsStateContext.Provider')
43-
}
44-
return context
40+
return useContext(DevtoolsStateContext)!
4541
}

0 commit comments

Comments
 (0)