mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-11 00:14:34 +00:00
chore: Enable "curly" rule to avoid single-statement if confusion/errors.
This commit is contained in:
@@ -10,7 +10,9 @@ export type ParsedLogLine = {
|
||||
function extractMessage(value: Record<string, unknown>): string {
|
||||
const parts: string[] = [];
|
||||
for (const key of Object.keys(value)) {
|
||||
if (!/^\d+$/.test(key)) continue;
|
||||
if (!/^\d+$/.test(key)) {
|
||||
continue;
|
||||
}
|
||||
const item = value[key];
|
||||
if (typeof item === "string") {
|
||||
parts.push(item);
|
||||
@@ -22,7 +24,9 @@ function extractMessage(value: Record<string, unknown>): string {
|
||||
}
|
||||
|
||||
function parseMetaName(raw?: unknown): { subsystem?: string; module?: string } {
|
||||
if (typeof raw !== "string") return {};
|
||||
if (typeof raw !== "string") {
|
||||
return {};
|
||||
}
|
||||
try {
|
||||
const parsed = JSON.parse(raw) as Record<string, unknown>;
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user