diff --git a/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceContext/WorkspaceContext.tsx b/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceContext/WorkspaceContext.tsx index 4870011c261eb..cd60b1e776c55 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceContext/WorkspaceContext.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/workspace/WorkspaceContext/WorkspaceContext.tsx @@ -62,9 +62,18 @@ interface WorkspaceState { setHidden: SetVisibleOrHiddenFn; } -export const WorkspaceContext = React.createContext( - new Error('WorkspaceContext should never be uninitialized') as any, -); +export const WorkspaceContext = React.createContext({ + allRepos: [], + visibleRepos: [], + data: {}, + refetch: () => Promise.reject(), + toggleVisible: () => {}, + loading: false, + locationEntries: [], + locationStatuses: {}, + setVisible: () => {}, + setHidden: () => {}, +}); interface BaseLocationParams { localCacheIdPrefix?: string;