mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-23 15:11:42 +00:00
refactor: dedupe plugin helper readers
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
import { normalizeOptionalString } from "../shared/string-coerce.js";
|
||||
|
||||
export function normalizePluginHttpPath(
|
||||
path?: string | null,
|
||||
fallback?: string | null,
|
||||
): string | null {
|
||||
const trimmed = path?.trim();
|
||||
const trimmed = normalizeOptionalString(path);
|
||||
if (!trimmed) {
|
||||
const fallbackTrimmed = fallback?.trim();
|
||||
const fallbackTrimmed = normalizeOptionalString(fallback);
|
||||
if (!fallbackTrimmed) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user