Skip to content

Commit

Permalink
revert: throw error on SidebarContext
Browse files Browse the repository at this point in the history
  • Loading branch information
rpenido committed Dec 10, 2024
1 parent 829cb5a commit 0de1c07
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/library-authoring/common/context/SidebarContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,16 +158,7 @@ export function useSidebarContext(): SidebarContextData {
const ctx = useContext(SidebarContext);
if (ctx === undefined) {
/* istanbul ignore next */
return {
closeLibrarySidebar: () => {},
openAddContentSidebar: () => {},
openInfoSidebar: () => {},
openComponentInfoSidebar: () => {},
openCollectionInfoSidebar: () => {},
resetSidebarAdditionalActions: () => {},
setSidebarCurrentTab: () => {},
sidebarComponentInfo: undefined,
};
throw new Error('useSidebarContext() was used in a component without a <SidebarProvider> ancestor.');
}
return ctx;
}

0 comments on commit 0de1c07

Please sign in to comment.