Skip to content

Commit 4d17c63

Browse files
committed
Use FilterWorldElement
1 parent c03350b commit 4d17c63

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

ArrayEditing/ArrayEditor.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,10 +411,9 @@ private static bool BuildArray(ISyncArray array, string name, FieldInfo fieldInf
411411
};
412412
void ClearRefs(Slot listSlot)
413413
{
414-
if (listSlot == null || listSlot.IsRemoved) return;
415-
listSlot.World.RunInUpdates(3, () =>
414+
listSlot.FilterWorldElement()?.World.RunInUpdates(3, () =>
416415
{
417-
if (listSlot == null || listSlot.IsRemoved) return;
416+
if (listSlot.FilterWorldElement() is null) return;
418417
foreach (var refProxySource in listSlot.GetComponentsInChildren<ReferenceProxySource>())
419418
{
420419
refProxySource.Reference.Target = null;

0 commit comments

Comments
 (0)