From e0e42debd2ce89be4cf68bd2b045aa8907546249 Mon Sep 17 00:00:00 2001 From: Vladimir Sklyar Date: Sun, 8 Aug 2021 19:53:33 +0300 Subject: [PATCH] #15 Fix memorizing of a chosen tab in the metabox --- assets/js/hooks/useCurrentTabStorage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/hooks/useCurrentTabStorage.js b/assets/js/hooks/useCurrentTabStorage.js index dbe2a6d..ca55c8d 100644 --- a/assets/js/hooks/useCurrentTabStorage.js +++ b/assets/js/hooks/useCurrentTabStorage.js @@ -7,7 +7,7 @@ export const useCurrentTabStorage = (entityType, currentTab, setCurrentTab) => { useEffect(() => { const storedValues = getStorageValue(); - if (! storedValues[entityType]) { + if (! storedValues || ! storedValues[entityType]) { return; }