fix: get non-exist key exception
parent
c46b980720
commit
19b8e377c4
|
@ -136,7 +136,10 @@ namespace LeanCloud.Realtime {
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public object this[string key] {
|
public object this[string key] {
|
||||||
get {
|
get {
|
||||||
return customProperties[key];
|
if (customProperties.TryGetValue(key, out object val)) {
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
customProperties[key] = value;
|
customProperties[key] = value;
|
||||||
|
|
Loading…
Reference in New Issue