mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-28 01:45:55 +08:00
Logger: Do not show null elements
Extremely hacky, I know.
This commit is contained in:
@ -211,8 +211,16 @@ class LogMessage {
|
|||||||
t = map['t'];
|
t = map['t'];
|
||||||
l = map['l'];
|
l = map['l'];
|
||||||
msg = map['msg'];
|
msg = map['msg'];
|
||||||
ex = map['ex'];
|
ex = _checkForNull(map['ex']);
|
||||||
stack = map['stack'];
|
stack = _checkForNull(map['stack']);
|
||||||
props = map['p'];
|
props = _checkForNull(map['p']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dynamic _checkForNull(dynamic e) {
|
||||||
|
if (e == null) return e;
|
||||||
|
if (e.runtimeType == String && e.toString().trim() == 'null') {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return e;
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user