mirror of
https://github.com/foss42/apidash.git
synced 2025-12-05 20:40:02 +08:00
Fix: getItemByTypeFromInsomniaCollection()
This commit is contained in:
@@ -12,12 +12,12 @@ List<(String?, Resource)> getItemByTypeFromInsomniaCollection(
|
|||||||
InsomniaCollection? ic,
|
InsomniaCollection? ic,
|
||||||
String type,
|
String type,
|
||||||
) {
|
) {
|
||||||
if (ic?.resources == null || ic!.resources!.length > 0) {
|
if (ic?.resources == null || ic!.resources!.length == 0) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
List<(String?, Resource)> requests = [];
|
List<(String?, Resource)> requests = [];
|
||||||
for (var item in ic.resources!) {
|
for (var item in ic.resources!) {
|
||||||
if (item.type != null || item.type == type) {
|
if (item.type != null && item.type == type) {
|
||||||
requests.add((item.name, item));
|
requests.add((item.name, item));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user