File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -17,11 +17,11 @@ const { computed, Logger } = Ember;
1717 define a prototype using `Resource.extend({ type: entity })`. Model prototypes
1818 are registered in the container as factories, they use the options:
1919 `{ instantiate: false, singleton: false }`. So, to create a model instance
20- use the owner API or the container to `lookup` the factory, for exampe :
20+ use the owner API or the container to `lookup` the factory, for example :
2121
2222 ```js
23- let owner = Ember.getOwner(this) || this.container;
24- owner.lookup('model:entity').create({ attributes: { key: value } });
23+ let owner = (typeof Ember.getOwner === 'function') ? Ember.getOwner (this) : this.container;
24+ let model = owner.lookup('model:entity').create({ attributes: { key: value } });
2525 ```
2626
2727 See <http://jsonapi.org/format/#document-resource-objects>
You can’t perform that action at this time.
0 commit comments