[Event] Add empty string check

This commit is contained in:
Christian Pauly 2019-08-29 08:51:35 +02:00
parent c96d2af354
commit 3bfed389a2

View file

@ -67,7 +67,7 @@ class RawEvent {
static Map<String, dynamic> getMapFromPayload(dynamic 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;
return null;
}