mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 13:31:25 +00:00
fix(onboarding): keep wildcard allowFrom helper string-typed
This commit is contained in:
@@ -5,9 +5,7 @@ export const promptAccountId: PromptAccountId = async (params: PromptAccountIdPa
|
|||||||
return await promptAccountIdSdk(params);
|
return await promptAccountIdSdk(params);
|
||||||
};
|
};
|
||||||
|
|
||||||
export function addWildcardAllowFrom(
|
export function addWildcardAllowFrom(allowFrom?: Array<string | number> | null): string[] {
|
||||||
allowFrom?: Array<string | number> | null,
|
|
||||||
): Array<string | number> {
|
|
||||||
const next = (allowFrom ?? []).map((v) => String(v).trim()).filter(Boolean);
|
const next = (allowFrom ?? []).map((v) => String(v).trim()).filter(Boolean);
|
||||||
if (!next.includes("*")) {
|
if (!next.includes("*")) {
|
||||||
next.push("*");
|
next.push("*");
|
||||||
|
|||||||
Reference in New Issue
Block a user