[Event] Add empty string check
This commit is contained in:
parent
c96d2af354
commit
3bfed389a2
|
@ -67,7 +67,7 @@ class RawEvent {
|
||||||
|
|
||||||
static Map<String, dynamic> getMapFromPayload(dynamic payload) {
|
static Map<String, dynamic> getMapFromPayload(dynamic payload) {
|
||||||
print("getMapFromPayload: $payload");
|
print("getMapFromPayload: $payload");
|
||||||
if (payload is String) return json.decode(payload);
|
if (payload is String && !payload.isEmpty) return json.decode(payload);
|
||||||
if (payload is Map<String, dynamic>) return payload;
|
if (payload is Map<String, dynamic>) return payload;
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue