Skip to content

Commit e414c09

Browse files
committed
fix undefined prop error in task history
1 parent 39a83ef commit e414c09

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/services/Task/Task.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -583,12 +583,18 @@ export const fetchTaskHistory = function (taskId) {
583583
.execute()
584584
.then((normalizedHistory) => {
585585
if (_isObject(normalizedHistory.result)) {
586+
// Transform history entries to ensure they have actionType
587+
const formattedHistory = _values(normalizedHistory.result).map((entry) => ({
588+
...entry,
589+
actionType: entry.action || "UNKNOWN", // Ensure actionType exists
590+
}));
591+
586592
// Inject history into task
587593
dispatch(
588594
receiveTasks(
589595
simulatedEntities({
590596
id: taskId,
591-
history: _values(normalizedHistory.result),
597+
history: formattedHistory,
592598
}),
593599
),
594600
);

0 commit comments

Comments
 (0)