Skip to content

Commit

Permalink
Don't assume HtmlString when inserting default values in templates (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
kjac authored Jan 31, 2025
1 parent 30c4408 commit 50ff23b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const getUmbracoFieldSnippet = (field: string, defaultValue: string | nul

const value = `${field !== null ? `@Model.Value("${field}"` : ''}${
fallback !== null ? `, fallback: ${fallback}` : ''
}${defaultValue !== null ? `, defaultValue: new HtmlString("${defaultValue}")` : ''}${field ? ')' : ')'}`;
}${defaultValue !== null ? `, defaultValue: (object)"${defaultValue}"` : ''}${field ? ')' : ')'}`;

return value;
};

0 comments on commit 50ff23b

Please sign in to comment.