Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

Commit

Permalink
Don't throw an error on empty params
Browse files Browse the repository at this point in the history
  • Loading branch information
ptgott committed Oct 8, 2024
1 parent cbdd550 commit cca48d8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions server/remark-includes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit cca48d8

Please sign in to comment.