From cca48d87ff49781b9483864850053840146df4da Mon Sep 17 00:00:00 2001 From: Paul Gottschling Date: Tue, 8 Oct 2024 10:42:52 -0400 Subject: [PATCH] Don't throw an error on empty params --- server/remark-includes.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/remark-includes.ts b/server/remark-includes.ts index 18caf37997..ab95f2cdc1 100644 --- a/server/remark-includes.ts +++ b/server/remark-includes.ts @@ -194,11 +194,11 @@ export function parseParamDefaults(expr: string): ParameterAssignments { // quotations are resolved within double-quoted strings but not single-quoted // strings. // -// Throws an exception if the quotes are mismatched, the input is not wrapped -// in quotes, or the input is empty +// Throws an exception if the quotes are mismatched or the input is not wrapped +// in quotes. export function resolveParamValue(val: string): string { - if (val == "") { - throw new Error("the value of a parameter in a partial cannot be empty"); + if (val === "") { + return ""; } if (val[0] !== `"`) { throw new Error(