From be5df27c4b7a4c28e0a27870032097c17c95f992 Mon Sep 17 00:00:00 2001 From: Tony Wu Date: Wed, 30 Aug 2023 10:05:24 +0200 Subject: [PATCH] Use result from the latest completed submission instead of the first --- js/interface.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/interface.js b/js/interface.js index e40bb49..92ccdd4 100644 --- a/js/interface.js +++ b/js/interface.js @@ -2182,9 +2182,9 @@ function submissionChecker(submissions) { return submission.status === 'completed'; }); - // Get the Submission data from the first completed submission, + // Get the Submission data from the latest completed submission, // it has the certification values that are in use on the app store. - previousAppStoreSubmission = _.minBy(completedAsub, function(el) { + previousAppStoreSubmission = _.maxBy(completedAsub, function(el) { return el.id; }); @@ -2233,9 +2233,9 @@ function submissionChecker(submissions) { return submission.status === 'completed'; }); - // Get the Submission data from the first completed submission, + // Get the Submission data from the latest completed submission, // it has certification values that are in use on the developer portal. - previousEnterpriseStoreSubmission = _.minBy(completedEsub, function(el) { + previousEnterpriseStoreSubmission = _.maxBy(completedEsub, function(el) { return el.id; });