[F] Fix null safety in GetItemIdFromItemName #3

Merged
liza merged 1 commits from Azaneko/Deliveroo:master into master 2024-08-29 06:46:52 +00:00

View File

@ -23,5 +23,6 @@ internal sealed class ItemCache
}
}
public HashSet<uint> GetItemIdFromItemName(string name) => _itemNamesToIds[name];
public HashSet<uint> GetItemIdFromItemName(string name) =>
_itemNamesToIds.TryGetValue(name, out var itemIds) ? itemIds : [];
}