xujunjie 1 рік тому
батько
коміт
499d3eb22e
1 змінених файлів з 2 додано та 2 видалено
  1. 2 2
      src/utils/GoalSeek.js

+ 2 - 2
src/utils/GoalSeek.js

@@ -34,7 +34,7 @@ export default async function GoalSeek(options) {
     res = await fn(...copyParams);
     if (res > goal) {
       minGuest -= oldGuess / 2;
-      await getMin(minGuest);
+      return await getMin(minGuest);
     }
     return minGuest;
   }
@@ -45,7 +45,7 @@ export default async function GoalSeek(options) {
     res = await fn(...copyParams);
     if (res < goal) {
       maxGuest += oldGuess / 2;
-      await getMax(maxGuest);
+      return await getMax(maxGuest);
     }
     return maxGuest;
   }