Skip to content

Commit

Permalink
add missing check
Browse files Browse the repository at this point in the history
  • Loading branch information
IObert committed Oct 14, 2024
1 parent f1c43a5 commit 6936996
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,10 @@ export async function getReadyToOrderMessage(
contentVariables[key] = value;
});

const templateName = `${SERVICE_INSTANCE_PREFIX.toLowerCase()}_ready_to_order_${availableOptions.length}`;

const limitess = maxNumberOrders >= 50 ? "_limitless" : "";

const templateName = `${SERVICE_INSTANCE_PREFIX.toLowerCase()}_ready_to_order${limitess}_${availableOptions.length}`;
const template = templates.find((t) => t.friendly_name === templateName);

if (!template) {
Expand Down

0 comments on commit 6936996

Please sign in to comment.