Made the intention of this code more clear

This commit is contained in:
Jelle
2022-12-04 14:13:20 +01:00
parent e8aa4778bc
commit 65f1a4efe4

View File

@@ -47,7 +47,9 @@ DataCache<T2> loader(GenericEditor<T2> form)
return tableCache.Cache;
}
Action? cb = addEntryCallback is { } x ? () => x.Invoke(tableCache.Root) : null;
Action? cb = null;
if (addEntryCallback != null)
cb = () => addEntryCallback.Invoke(tableCache.Root);
using var form = new GenericEditor<T2>(loader, getName, title, rand, cb, canSave);
form.ShowDialog();