Default hostmaps to []
This commit is contained in:
parent
38389e99d4
commit
d9f4b8b56d
|
@ -206,6 +206,9 @@ class Site {
|
|||
Future<List<HostInfo>> listHostmap() async {
|
||||
try {
|
||||
var ret = await platform.invokeMethod("active.listHostmap", <String, String>{"id": id});
|
||||
if (ret == null) {
|
||||
return [];
|
||||
}
|
||||
|
||||
List<dynamic> f = jsonDecode(ret);
|
||||
List<HostInfo> hosts = [];
|
||||
|
@ -226,6 +229,9 @@ class Site {
|
|||
Future<List<HostInfo>> listPendingHostmap() async {
|
||||
try {
|
||||
var ret = await platform.invokeMethod("active.listPendingHostmap", <String, String>{"id": id});
|
||||
if (ret == null) {
|
||||
return [];
|
||||
}
|
||||
|
||||
List<dynamic> f = jsonDecode(ret);
|
||||
List<HostInfo> hosts = [];
|
||||
|
|
Loading…
Reference in New Issue