From c96ca850b4d9f536aabf5789471d7017c1f062df Mon Sep 17 00:00:00 2001 From: Vova Date: Mon, 15 May 2023 18:00:37 +0300 Subject: [PATCH] Fix not found job position --- Assets/Scripts/InteractableObjects/CashierDesk.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Scripts/InteractableObjects/CashierDesk.cs b/Assets/Scripts/InteractableObjects/CashierDesk.cs index b88be1a7..a3e5c728 100644 --- a/Assets/Scripts/InteractableObjects/CashierDesk.cs +++ b/Assets/Scripts/InteractableObjects/CashierDesk.cs @@ -20,7 +20,7 @@ public class CashierDesk : BaseInteractableObject } else { - _playerJob = _jobsInfoList.First(x => x.JobPosition == player.JobPosition); + _playerJob = _jobsInfoList.Where(x => x.JobPosition == player.JobPosition).FirstOrDefault(); print($"playerJob is {_playerJob}"); if (_playerJob != null) {