mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-04 21:04:37 +08:00
Normalize quoted docs env placeholders
This commit is contained in:
parent
36c421366f
commit
4367dde6a9
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user