fix(task/combineEvents): defineProperty → defineProperties

Fixes zammad#14566
This commit is contained in:
Julien Fontanet
2023-05-09 15:11:51 +02:00
parent 159339625d
commit 5c436f3870
2 changed files with 4 additions and 1 deletions

View File

@@ -48,7 +48,7 @@ exports.makeOnProgress = function ({ onRootTaskEnd = noop, onRootTaskStart = noo
assert.notEqual(parent, undefined)
// inject a (non-enumerable) reference to the parent and the root task
Object.defineProperty(taskLog, { $parent: { value: parent }, $root: { value: parent.$root } })
Object.defineProperties(taskLog, { $parent: { value: parent }, $root: { value: parent.$root } })
;(parent.tasks ?? (parent.tasks = [])).push(taskLog)
}
} else {