Skip to content

Commit 91c761f

Browse files
committed
Fix: getItemByTypeFromInsomniaCollection()
1 parent 0ee7bf6 commit 91c761f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/insomnia_collection/lib/utils/insomnia_utils.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ List<(String?, Resource)> getItemByTypeFromInsomniaCollection(
1212
InsomniaCollection? ic,
1313
String type,
1414
) {
15-
if (ic?.resources == null || ic!.resources!.length > 0) {
15+
if (ic?.resources == null || ic!.resources!.length == 0) {
1616
return [];
1717
}
1818
List<(String?, Resource)> requests = [];
1919
for (var item in ic.resources!) {
20-
if (item.type != null || item.type == type) {
20+
if (item.type != null && item.type == type) {
2121
requests.add((item.name, item));
2222
}
2323
}

0 commit comments

Comments
 (0)