Skip to content

Commit

Permalink
Merge pull request #16543 from bekzod/collapse-if
Browse files Browse the repository at this point in the history
collapse `if` statement in `defineProperty`
  • Loading branch information
rwjblue authored Apr 18, 2018
2 parents a4bbcac + b1d4c89 commit 3f0652d
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions packages/ember-metal/lib/properties.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,7 @@ export function defineProperty(obj, keyName, desc, data, meta) {
};

Object.defineProperty(obj, keyName, defaultDescriptor);
} else if (wasDescriptor) {
Object.defineProperty(obj, keyName, {
configurable: true,
enumerable,
writable: true,
value,
});
} else if (enumerable === false) {
} else if (wasDescriptor || enumerable === false) {
Object.defineProperty(obj, keyName, {
configurable: true,
enumerable,
Expand Down

0 comments on commit 3f0652d

Please sign in to comment.