From f06525a57f299c10ef97272117a057e8ea862f96 Mon Sep 17 00:00:00 2001 From: Chris Manson Date: Thu, 9 Nov 2023 16:23:25 +0000 Subject: [PATCH] always use extend for Internal OptionsObject --- addon/-private/options.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/addon/-private/options.js b/addon/-private/options.js index dfa9a77c..3402a0ee 100644 --- a/addon/-private/options.js +++ b/addon/-private/options.js @@ -1,5 +1,4 @@ import EmberObject, { get } from '@ember/object'; -import { isDescriptor } from '../utils/utils'; const { keys } = Object; const OPTION_KEYS = '__option_keys__'; @@ -18,11 +17,7 @@ export default class Options { const optionKeys = keys(options); const createParams = { [OPTION_KEYS]: optionKeys, model, attribute }; - // If any of the options is a CP, we need to create a custom class for it - if (optionKeys.some((key) => isDescriptor(options[key]))) { - return OptionsObject.extend(options).create(createParams); - } - - return OptionsObject.create(createParams, options); + // we have to extend here in case anyone passes options that have computedProperties. + return OptionsObject.extend(options).create(createParams); } }