We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2a24870 + ae55870 commit fb70185Copy full SHA for fb70185
src/core/services/client-manager.ts
@@ -201,17 +201,7 @@ class ClientManager {
201
max_version: { [Op.gt]: version },
202
},
203
}).then((deploymentsVersionsMore) => {
204
- let distance = 0;
205
- let item = null;
206
- _.map(deploymentsVersionsMore, (value, index) => {
207
- if (index === 0) {
208
- item = value;
209
- distance = value.max_version - value.min_version;
210
- } else if (distance > value.max_version - value.min_version) {
211
212
213
- }
214
- });
+ const item = _.last(_.sortBy(deploymentsVersionsMore, 'created_at'));
215
logger.debug({
216
item,
217
});
0 commit comments