mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 12:10:42 +00:00
refactor(lint): enable map spread rule
This commit is contained in:
@@ -141,7 +141,7 @@ function normalizeProviderModels(
|
||||
return model;
|
||||
}
|
||||
mutated = true;
|
||||
return { ...model, id: nextId };
|
||||
return Object.assign({}, model, { id: nextId });
|
||||
});
|
||||
|
||||
return mutated ? { ...provider, models: nextModels } : provider;
|
||||
|
||||
@@ -120,10 +120,9 @@ async function runGeminiSearch(params: {
|
||||
for (let index = 0; index < rawCitations.length; index += 10) {
|
||||
const batch = rawCitations.slice(index, index + 10);
|
||||
const resolved = await Promise.all(
|
||||
batch.map(async (citation) => ({
|
||||
...citation,
|
||||
url: await resolveCitationRedirectUrl(citation.url),
|
||||
})),
|
||||
batch.map(async (citation) =>
|
||||
Object.assign({}, citation, { url: await resolveCitationRedirectUrl(citation.url) }),
|
||||
),
|
||||
);
|
||||
citations.push(...resolved);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user