Skip to content

Commit

Permalink
fix: Ember 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
buschtoens committed Mar 6, 2019
1 parent 9cd9781 commit 63a85fa
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions addon/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ function extractValue(desc, allowNoInitializer = false) {
const { value } = desc.descriptor;
delete desc.descriptor.value;
desc.kind = 'field';

// This somehow happens for Ember 3.8 🤷🏼‍
if (desc.initializer) {
const { initializer } = desc;
delete desc.initializer;
return initializer();
}

return value;
}
case 'field': {
Expand Down Expand Up @@ -76,6 +84,7 @@ function createTaskFromDescriptor(desc) {
desc.descriptor.writable
);

debugger;
const value = extractValue(desc);
assert(
'ember-concurrency-decorators: Can only decorate a generator function as a task or an object with a generator method `perform` as an encapsulated task.',
Expand Down

0 comments on commit 63a85fa

Please sign in to comment.