mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-23 19:48:54 +02:00
Substitute for-of with forEach
Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
This commit is contained in:
parent
e7e9fa78e0
commit
8a4c6ac49e
1 changed files with 2 additions and 2 deletions
|
@ -22,12 +22,12 @@ const useTabGroupChoice = (): useTabGroupChoiceReturns => {
|
|||
useEffect(() => {
|
||||
try {
|
||||
const localStorageChoices = {};
|
||||
for (const storageKey of listStorageKeys()) {
|
||||
listStorageKeys().forEach((storageKey) => {
|
||||
if (storageKey.startsWith(TAB_CHOICE_PREFIX)) {
|
||||
const groupId = storageKey.substring(TAB_CHOICE_PREFIX.length);
|
||||
localStorageChoices[groupId] = createStorageSlot(storageKey).get();
|
||||
}
|
||||
}
|
||||
});
|
||||
setChoices(localStorageChoices);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue