From e5e3e84b2393929606b768a340a9f2498ef8b0a5 Mon Sep 17 00:00:00 2001 From: Bill Kachirsky Date: Thu, 27 Feb 2020 01:48:56 -0800 Subject: [PATCH] Fix error of only loading one issue if no limit (-1) is set. --- src/biz/elfuego/idea/issues/gitea/GiteaRepository.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/biz/elfuego/idea/issues/gitea/GiteaRepository.java b/src/biz/elfuego/idea/issues/gitea/GiteaRepository.java index 11e1ce0..98d99a2 100644 --- a/src/biz/elfuego/idea/issues/gitea/GiteaRepository.java +++ b/src/biz/elfuego/idea/issues/gitea/GiteaRepository.java @@ -296,9 +296,11 @@ class GiteaRepository extends BaseRepositoryImpl { continue; GiteaTaskImpl mapped = new GiteaTaskImpl(this, raw); result.add(mapped); - limit--; - if (limit < 1) - return false; + if (limit > -1) { + limit--; + if (limit < 1) + return false; + } } return true; }