Skip to content

Commit

Permalink
Improved Future.complete
Browse files Browse the repository at this point in the history
  • Loading branch information
andot committed Nov 18, 2016
1 parent 4dd7584 commit 8c12191
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"author": "Ma Bingyao <[email protected]>",
"name": "hprose",
"version": "2.0.24",
"version": "2.0.25",
"description": "Hprose is a High Performance Remote Object Service Engine.",
"keywords": [
"hprose",
Expand Down
4 changes: 2 additions & 2 deletions dist/hprose.js

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

2 changes: 1 addition & 1 deletion dist/hprose.min.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions dist/hprose.src.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Hprose for JavaScript v2.0.24
// Hprose for JavaScript v2.0.25
// Copyright (c) 2008-2016 http://hprose.com
// Hprose is freely distributable under the MIT license.
// For all details and documentation:
Expand Down Expand Up @@ -2411,7 +2411,8 @@ hprose.global = (
);
} },
complete: { value: function(oncomplete) {
return this.then(oncomplete, oncomplete);
oncomplete = oncomplete || function(v) { return v; };
return this.then(oncomplete, oncomplete);
} },
always: { value: function(oncomplete) {
this.done(oncomplete, oncomplete);
Expand Down
4 changes: 2 additions & 2 deletions example/hprose.js

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "hprose-js",
"filename": "hprose.js",
"version": "2.0.24",
"version": "2.0.25",
"description": "Hprose is a High Performance Remote Object Service Engine.",
"homepage": "https://github.com/hprose",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion src/CopyRight.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Hprose for JavaScript v2.0.24
// Hprose for JavaScript v2.0.25
// Copyright (c) 2008-2016 http://hprose.com
// Hprose is freely distributable under the MIT license.
// For all details and documentation:
Expand Down
3 changes: 2 additions & 1 deletion src/Future.js
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,8 @@
);
} },
complete: { value: function(oncomplete) {
return this.then(oncomplete, oncomplete);
oncomplete = oncomplete || function(v) { return v; };
return this.then(oncomplete, oncomplete);
} },
always: { value: function(oncomplete) {
this.done(oncomplete, oncomplete);
Expand Down
4 changes: 2 additions & 2 deletions test/hprose.js

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

0 comments on commit 8c12191

Please sign in to comment.