We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b59581c commit 808eb40Copy full SHA for 808eb40
app/lib/text-variables.ts
@@ -1,12 +1,13 @@
1
import type { Batch, Certificate } from "@prisma/client";
2
3
export function replaceVariables(
4
- text: string = "",
+ text: string,
5
locale: string = "de-DE",
6
certificate: Certificate,
7
batch: Batch,
8
) {
9
- let replacements = text;
+ let replacements = text || "";
10
+
11
12
// @todo refactor date formats to be configurable via template settings
13
const startDate = batch.startDate.toLocaleString(locale, {
0 commit comments