Skip to content

Commit

Permalink
Use in check rather than undefined.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpschaaf committed Mar 6, 2019
1 parent bc258d6 commit c467c34
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/legacy/class.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit c467c34

Please sign in to comment.