From a80f5f952a87969237117957d5c38e62d4294f24 Mon Sep 17 00:00:00 2001 From: MoskalykA <100430077+MoskalykA@users.noreply.github.com> Date: Wed, 1 Mar 2023 09:54:49 +0100 Subject: [PATCH] refactor: more logical code --- [core]/es_extended/client/functions.lua | 4 ++-- [core]/esx_context/main.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/[core]/es_extended/client/functions.lua b/[core]/es_extended/client/functions.lua index cd610edc..8e137eca 100644 --- a/[core]/es_extended/client/functions.lua +++ b/[core]/es_extended/client/functions.lua @@ -357,7 +357,7 @@ function ESX.Game.Teleport(entity, coords, cb) end function ESX.Game.SpawnObject(object, coords, cb, networked) - networked = networked == nil and true or networked + networked = networked or true if networked then ESX.TriggerServerCallback('esx:Onesync:SpawnObject', function(NetworkID) if cb then @@ -405,7 +405,7 @@ end function ESX.Game.SpawnVehicle(vehicle, coords, heading, cb, networked) local model = type(vehicle) == 'number' and vehicle or joaat(vehicle) local vector = type(coords) == "vector3" and coords or vec(coords.x, coords.y, coords.z) - networked = networked == nil and true or networked + networked = networked or true CreateThread(function() ESX.Streaming.RequestModel(model) diff --git a/[core]/esx_context/main.lua b/[core]/esx_context/main.lua index 55bfad9c..b497de6d 100644 --- a/[core]/esx_context/main.lua +++ b/[core]/esx_context/main.lua @@ -13,7 +13,7 @@ function Post(fn,...) end function Open(position,eles,onSelect,onClose,canClose) - local canClose = canClose == nil and true or canClose + local canClose = canClose or true activeMenu = { position = position, eles = eles,