Skip to content

Commit

Permalink
Success
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Jan 13, 2024
1 parent 0696ed4 commit 644bef5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion reactiveweb/src/ember-concurrency.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ export class State<Args extends any[], Return, LocalTask extends TaskIsh<Args, R
*/
return new Proxy(self, {
get(target, key): unknown {
if (key === RUN) {
return self[RUN];
}

const taskRunner = self;
const instance = taskRunner.currentTask;

Expand Down Expand Up @@ -185,7 +189,7 @@ export class State<Args extends any[], Return, LocalTask extends TaskIsh<Args, R
return this.lastTask?.value;
}

[RUN](positional: Args) {
[RUN] = (positional: Args) => {
if (this.currentTask) {
this.lastTask = this.currentTask;
}
Expand Down

0 comments on commit 644bef5

Please sign in to comment.