@lendi/integrations-transform 1.4.3 → 1.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -52,10 +52,12 @@ exports.updatePrimaryApplicant = updatePrimaryApplicant;
|
|
|
52
52
|
* @returns {PartialApplication} - Updated application
|
|
53
53
|
*/
|
|
54
54
|
var updatePrimaryApplicantUsingGuarantor = function (application, applicantPayload) {
|
|
55
|
+
var _a;
|
|
55
56
|
var updatedApplication = application, personApplicants = (0, lodash_1.get)(application, application_paths_1.paths.PersonApplicants, []);
|
|
56
57
|
// Checks if there are more than one borrower in the application and that the applicant type of the applicant event being processed is GUARANTOR
|
|
57
58
|
if ((0, exports.isMultiplePersonApplicantBorrowers)(personApplicants) &&
|
|
58
|
-
applicantPayload.applicantType === public_applicant_1.ApplicantType.Guarantor
|
|
59
|
+
applicantPayload.applicantType === public_applicant_1.ApplicantType.Guarantor &&
|
|
60
|
+
((_a = applicantPayload.guarantorRelationshipToBorrower) === null || _a === void 0 ? void 0 : _a.applicantId)) {
|
|
59
61
|
(0, lodash_1.set)(updatedApplication, application_paths_1.paths.PersonApplicants, (0, exports.updatePrimaryApplicant)(applicantPayload.guarantorRelationshipToBorrower.applicantId, personApplicants));
|
|
60
62
|
}
|
|
61
63
|
return updatedApplication;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lendi/integrations-transform",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.4",
|
|
4
4
|
"description": "Library for kafka event data transforming",
|
|
5
5
|
"author": "Integrations <integrations@lendi.com.au>",
|
|
6
6
|
"homepage": "https://bitbucket.org/lendi-dev/integrations-shared-packages#readme",
|