fix(editor): "Trigger node not found" error when chat message is entered (#14954)

This commit is contained in:
Suguru Inoue
2025-04-29 13:45:30 +02:00
committed by GitHub
parent 7f89244304
commit 8981e22dd4
9 changed files with 125 additions and 107 deletions

View File

@@ -431,8 +431,18 @@ export function findSelectedLogEntry(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function deepToRaw<T>(sourceObj: T): T {
const seen = new WeakMap();
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const objectIterator = (input: any): any => {
if (seen.has(input)) {
return input;
}
if (input !== null && typeof input === 'object') {
seen.set(input, true);
}
if (Array.isArray(input)) {
return input.map((item) => objectIterator(item));
}