Skip to content

Commit

Permalink
Do not require a callback for a managed task (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
kasper committed Nov 12, 2016
1 parent 4b348f1 commit f147775
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ Release: dd.mm.yyyy
- Breaking: Underscore.js is replaced with [Lodash](https://lodash.com) (4.16.6) ([#89](https://github.com/kasper/phoenix/issues/89)).
- Xcode 8 is now required for building.

### API

#### Task

- Change: Function `run(String path, Array arguments, Function callback)` can now be called without a callback ([#135](https://github.com/kasper/phoenix/issues/135)).

2.3
---

Expand Down
2 changes: 1 addition & 1 deletion Phoenix/phoenix.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion library/src/task.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@

scope.run = function (path, args, callback) {
var task = new Task(path, args, function (handler) {
callback(handler);
if (callback) {
callback(handler);
}
Task.terminate(handler.hash());
});
tasks[task.hash()] = task;
Expand Down

0 comments on commit f147775

Please sign in to comment.