Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Commit

Permalink
Bale collector fix for #6916
Browse files Browse the repository at this point in the history
Check if object has an isa() function, no idea why this is a problem with
missions only.
  • Loading branch information
pvaiko committed Feb 27, 2021
1 parent 9b6d6f1 commit 3068bd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion BaleToCollect.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ end
--- Call this before attempting to construct a BaleToCollect to check the validity of the object
function BaleToCollect.isValidBale(object)
-- nodeId is sometimes 0, causing issues for the BaleToCollect constructor
return object:isa(Bale) and object.nodeId and entityExists(object.nodeId)
return object.isa and object:isa(Bale) and object.nodeId and entityExists(object.nodeId)
end

function BaleToCollect:getFieldId()
Expand Down

0 comments on commit 3068bd9

Please sign in to comment.