Skip to content

Commit f06525a

Browse files
committed
always use extend for Internal OptionsObject
1 parent 059b9b8 commit f06525a

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

addon/-private/options.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import EmberObject, { get } from '@ember/object';
2-
import { isDescriptor } from '../utils/utils';
32

43
const { keys } = Object;
54
const OPTION_KEYS = '__option_keys__';
@@ -18,11 +17,7 @@ export default class Options {
1817
const optionKeys = keys(options);
1918
const createParams = { [OPTION_KEYS]: optionKeys, model, attribute };
2019

21-
// If any of the options is a CP, we need to create a custom class for it
22-
if (optionKeys.some((key) => isDescriptor(options[key]))) {
23-
return OptionsObject.extend(options).create(createParams);
24-
}
25-
26-
return OptionsObject.create(createParams, options);
20+
// we have to extend here in case anyone passes options that have computedProperties.
21+
return OptionsObject.extend(options).create(createParams);
2722
}
2823
}

0 commit comments

Comments
 (0)