From b1d4c89e0a2349d5d2b51d3035c0fe7b385eea80 Mon Sep 17 00:00:00 2001 From: bekzod Date: Wed, 18 Apr 2018 19:16:07 +0500 Subject: [PATCH] collapse `if` statement in `defineProperty` --- packages/ember-metal/lib/properties.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/packages/ember-metal/lib/properties.js b/packages/ember-metal/lib/properties.js index a152c8a127c..5ae4c7d7d71 100644 --- a/packages/ember-metal/lib/properties.js +++ b/packages/ember-metal/lib/properties.js @@ -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,