fix: HOTFIX r.map is not a function (#7872)

This commit is contained in:
Dallin Romney 2025-09-22 12:54:33 -07:00 • committed by GitHub
parent 295427cc47
commit 2aa6f03518
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -119,7 +119,10 @@ export function FindAndReplaceDisplay({
if (editingFileContents) {
return editingFileContents;
}
return edits?.map((edit) => edit.old_string ?? "").join("\n");
if (Array.isArray(edits)) {
return edits.map((edit) => edit.old_string ?? "").join("\n");
}
return "";
}, [editingFileContents, edits]);
const diffResult = useMemo(() => {