Skip to content

Commit 808eb40

Browse files
committed
Another fix for variable replacements
1 parent b59581c commit 808eb40

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/lib/text-variables.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import type { Batch, Certificate } from "@prisma/client";
22

33
export function replaceVariables(
4-
text: string = "",
4+
text: string,
55
locale: string = "de-DE",
66
certificate: Certificate,
77
batch: Batch,
88
) {
9-
let replacements = text;
9+
let replacements = text || "";
10+
1011

1112
// @todo refactor date formats to be configurable via template settings
1213
const startDate = batch.startDate.toLocaleString(locale, {

0 commit comments

Comments
 (0)