fix(DataManager): 修正Poll函数中,key为null时异常的的问题。
This commit is contained in:
parent
9bc880b3f0
commit
c96131cfae
|
@ -225,7 +225,9 @@ namespace Aitex.Core.RT.DataCenter
|
|||
|
||||
public object Poll(string key)
|
||||
{
|
||||
return _keyValueMap.ContainsKey(key) ? _keyValueMap[key].Value : null;
|
||||
if (string.IsNullOrEmpty(key))
|
||||
return null;
|
||||
return _keyValueMap.TryGetValue(key, out var item) ? item.Value : null;
|
||||
}
|
||||
|
||||
public void Traverse(object instance, string keyPrefix)
|
||||
|
|
Loading…
Reference in New Issue