fix: use strict equality (===) for status code checks to prevent accidental assignment

This commit is contained in:
shubhamsharma9199
2025-11-05 22:34:42 +05:30
parent e4d5966bd6
commit 70b248cd6a
3 changed files with 3 additions and 3 deletions
@@ -172,7 +172,7 @@ export class ClientApprovalComponent {
}); });
this.tasksService.submitBatchData(this.batchRequests).subscribe((response: any) => { this.tasksService.submitBatchData(this.batchRequests).subscribe((response: any) => {
response.forEach((responseEle: any) => { response.forEach((responseEle: any) => {
if ((responseEle.statusCode = '200')) { if (responseEle.statusCode === '200') {
activatedAccounts++; activatedAccounts++;
responseEle.body = JSON.parse(responseEle.body); responseEle.body = JSON.parse(responseEle.body);
if (selectedAccounts === activatedAccounts) { if (selectedAccounts === activatedAccounts) {
@@ -202,7 +202,7 @@ export class LoanApprovalComponent {
}); });
this.tasksService.submitBatchData(this.batchRequests).subscribe((response: any) => { this.tasksService.submitBatchData(this.batchRequests).subscribe((response: any) => {
response.forEach((responseEle: any) => { response.forEach((responseEle: any) => {
if ((responseEle.statusCode = '200')) { if (responseEle.statusCode === '200') {
approvedAccounts++; approvedAccounts++;
responseEle.body = JSON.parse(responseEle.body); responseEle.body = JSON.parse(responseEle.body);
if (selectedAccounts === approvedAccounts) { if (selectedAccounts === approvedAccounts) {
@@ -154,7 +154,7 @@ export class LoanDisbursalComponent {
}); });
this.tasksService.submitBatchData(this.batchRequests).subscribe((response: any) => { this.tasksService.submitBatchData(this.batchRequests).subscribe((response: any) => {
response.forEach((responseEle: any) => { response.forEach((responseEle: any) => {
if ((responseEle.statusCode = '200')) { if (responseEle.statusCode === '200') {
approvedAccounts++; approvedAccounts++;
responseEle.body = JSON.parse(responseEle.body); responseEle.body = JSON.parse(responseEle.body);
if (selectedAccounts === approvedAccounts) { if (selectedAccounts === approvedAccounts) {