Skip to content

Commit

Permalink
always use extend for Internal OptionsObject
Browse files Browse the repository at this point in the history
  • Loading branch information
mansona committed Nov 9, 2023
1 parent 75d558c commit e72c267
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions addon/-private/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,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);
}
}

0 comments on commit e72c267

Please sign in to comment.