Normalize quoted docs env placeholders

This commit is contained in:
Devin AI 2026-05-29 23:45:14 +00:00
parent 36c421366f
commit 4367dde6a9

View File

@ -5,10 +5,11 @@ const placeholderPrefix = "#";
const replaceMePlaceholder = "REPLACE_ME";
function envOrUndefined(value: string | undefined): string | undefined {
if (value == null || value === "" || value === replaceMePlaceholder || value.startsWith(placeholderPrefix)) {
const normalized = value?.trim();
if (normalized == null || normalized === "" || normalized.replace(/^["']|["']$/g, "") === replaceMePlaceholder || normalized.startsWith(placeholderPrefix)) {
return undefined;
}
return value;
return normalized;
}
// Explicitly configure Stack Auth for docs app