Skip to content

Commit 8c12191

Browse files
committed
Improved Future.complete
1 parent 4dd7584 commit 8c12191

9 files changed

Lines changed: 15 additions & 13 deletions

File tree

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"author": "Ma Bingyao <andot@hprose.com>",
33
"name": "hprose",
4-
"version": "2.0.24",
4+
"version": "2.0.25",
55
"description": "Hprose is a High Performance Remote Object Service Engine.",
66
"keywords": [
77
"hprose",

dist/hprose.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/hprose.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/hprose.src.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Hprose for JavaScript v2.0.24
1+
// Hprose for JavaScript v2.0.25
22
// Copyright (c) 2008-2016 http://hprose.com
33
// Hprose is freely distributable under the MIT license.
44
// For all details and documentation:
@@ -2411,7 +2411,8 @@ hprose.global = (
24112411
);
24122412
} },
24132413
complete: { value: function(oncomplete) {
2414-
return this.then(oncomplete, oncomplete);
2414+
oncomplete = oncomplete || function(v) { return v; };
2415+
return this.then(oncomplete, oncomplete);
24152416
} },
24162417
always: { value: function(oncomplete) {
24172418
this.done(oncomplete, oncomplete);

example/hprose.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "hprose-js",
33
"filename": "hprose.js",
4-
"version": "2.0.24",
4+
"version": "2.0.25",
55
"description": "Hprose is a High Performance Remote Object Service Engine.",
66
"homepage": "https://github.com/hprose",
77
"license": "MIT",

src/CopyRight.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Hprose for JavaScript v2.0.24
1+
// Hprose for JavaScript v2.0.25
22
// Copyright (c) 2008-2016 http://hprose.com
33
// Hprose is freely distributable under the MIT license.
44
// For all details and documentation:

src/Future.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,8 @@
690690
);
691691
} },
692692
complete: { value: function(oncomplete) {
693-
return this.then(oncomplete, oncomplete);
693+
oncomplete = oncomplete || function(v) { return v; };
694+
return this.then(oncomplete, oncomplete);
694695
} },
695696
always: { value: function(oncomplete) {
696697
this.done(oncomplete, oncomplete);

test/hprose.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)