fix new logic to calculator with required and optional subjects
Tests & Lint & Deploy to Railway / build (2.6.6, 20.x, 8.3) (push) Successful in 1m47s Details
Tests & Lint & Deploy to Railway / deploy (push) Successful in 32s Details

This commit is contained in:
aslan 2024-03-18 11:56:03 +03:00
parent 75870ab2fd
commit 9fcd049173
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ class CalculatorController extends Controller
}, true);
})
->filter(function ($subjectTypes) use ($calcultatorSubjects) {
if(array_key_exists(2, $subjectTypes)) {
if (array_key_exists(2, $subjectTypes)) {
$optionalSubjectsInCalculator = collect($subjectTypes[2])
->filter(fn($optionalSubject) => in_array($optionalSubject, $calcultatorSubjects));
return $optionalSubjectsInCalculator->count() !== 0;