Try different approach to null items

This commit is contained in:
Matt Nadareski
2020-07-19 13:09:08 -07:00
parent 9c7b044e93
commit 75490b7e13

View File

@@ -63,7 +63,7 @@ namespace SabreTools.Library.DatFiles
EnsureKey(key);
// Now return the value
return Items[key].Where(i => i != null).ToList();
return Items[key];
}
}
@@ -77,6 +77,10 @@ namespace SabreTools.Library.DatFiles
// Ensure the key exists
EnsureKey(key);
// If item is null, don't add it
if (value == null)
return;
// Now add the value
Items[key].Add(value);