File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -167,7 +167,15 @@ export const transform = async (
167167 "color:red"
168168 ) ;
169169 }
170- if ( ! _isTemporaryField ( field ) || pathTrace . length > 0 ) transformedOutput [ field ] = result ;
170+ /**
171+ * When temporary fields are referenced elsewhere,
172+ * it is essential to remove these temporary variables
173+ * to maintain a clean and accurate state.
174+ *
175+ * This ensures that temporary fields do not persist unnecessarily
176+ * or interfere with the final output.
177+ */
178+ if ( ! _isTemporaryField ( field ) || pathTrace . length > 0 ) transformedOutput [ field ] = typeof result === "object" && ! Array . isArray ( result ) ? _cleanTemporaryFields ( result ) : result ;
171179 /**
172180 * When working inside a sub-transformation, there is no need to explicitly
173181 * update the derived state of the parent with changes made within the
You can’t perform that action at this time.
0 commit comments