From 0de1c076c5325b20cb95fe02b32b367cbf0c9213 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B4mulo=20Penido?= Date: Tue, 10 Dec 2024 18:24:34 -0300 Subject: [PATCH] revert: throw error on SidebarContext --- .../common/context/SidebarContext.tsx | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/library-authoring/common/context/SidebarContext.tsx b/src/library-authoring/common/context/SidebarContext.tsx index d9ba68d69..d17ee6f9e 100644 --- a/src/library-authoring/common/context/SidebarContext.tsx +++ b/src/library-authoring/common/context/SidebarContext.tsx @@ -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 ancestor.'); } return ctx; }