We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cde0fa2 commit d78a369Copy full SHA for d78a369
packages/hypergraph-react/src/HypergraphSpaceContext.tsx
@@ -15,16 +15,13 @@ import {
15
} from 'react';
16
import { useHypergraphApp } from './HypergraphAppContext.js';
17
18
+// TODO space can be undefined
19
export type HypergraphContext = { space: string };
20
21
export const HypergraphReactContext = createContext<HypergraphContext | undefined>(undefined);
22
23
export function useHypergraphSpaceInternal() {
24
const context = useContext(HypergraphReactContext);
- if (!context) {
25
- throw new Error('useHypergraphSpace must be used within a HypergraphSpaceProvider');
26
- }
27
-
28
return context as HypergraphContext;
29
}
30
0 commit comments