diff --git a/lib/legacy/class.js b/lib/legacy/class.js index 77eb4fb690..a35c0c5c84 100644 --- a/lib/legacy/class.js +++ b/lib/legacy/class.js @@ -166,10 +166,9 @@ function flattenBehaviors(behaviors, list, exclude) { function mergeProperties(target, source) { for (const p in source) { const targetInfo = target[p]; - const value = targetInfo && targetInfo.value; const sourceInfo = source[p]; - if (sourceInfo.value === undefined && value !== undefined) { - target[p] = Object.assign({value}, sourceInfo); + if (!('value' in sourceInfo) && targetInfo && ('value' in targetInfo)) { + target[p] = Object.assign({value: targetInfo.value}, sourceInfo); } else { target[p] = sourceInfo; }