Преглед изворни кода

Fixed on memory persistance issue

jnfrati пре 4 година
родитељ
комит
80572c8e0c
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      dashboard/src/main/home/onboarding/components/ProviderSelector.tsx

+ 2 - 2
dashboard/src/main/home/onboarding/components/ProviderSelector.tsx

@@ -62,7 +62,7 @@ const ProviderSelector: React.FC<ProviderSelectorProps> = ({
   });
 
   const availableOptions = useMemo(() => {
-    let options = baseOptions;
+    let options = [...baseOptions];
     if (enableSkip) {
       // Check if dummy option was deleted or not
       const dummyOptionIndex = options.findIndex((o) => o.value === "dummy");
@@ -87,7 +87,7 @@ const ProviderSelector: React.FC<ProviderSelectorProps> = ({
       }
     }
 
-    return options;
+    return [...options];
   }, [enableSkip, enableExternal]);
 
   return (