Skip to content

Commit f16e92d

Browse files
committed
Updating JS
1 parent 8228808 commit f16e92d

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/components/SubProcessorsForm.astro

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -484,13 +484,18 @@
484484
const serviceKey = service.toLowerCase() as keyof typeof subProcessorsData;
485485
if (subProcessorsData[serviceKey]) {
486486
subProcessorsData[serviceKey].forEach((processor: any) => {
487-
// Check if processor should be included based on conditions
488-
if (processor.condition) {
489-
const condition = processor.condition.replace('emailServices', `'${emailServices}'`);
490-
if (!eval(condition)) {
487+
// Check if processor should be included based on conditions
488+
if (processor.condition) {
489+
if (processor.condition === "emailServices === 'Kinde default'") {
490+
if (emailServices !== 'Kinde default') {
491+
return; // Skip this processor
492+
}
493+
} else if (processor.condition === "smsServices === 'Kinde default'") {
494+
if (smsServices !== 'Kinde default') {
491495
return; // Skip this processor
492496
}
493497
}
498+
}
494499

495500
relevantSubProcessors.push({
496501
service: processor.service,

0 commit comments

Comments
 (0)