Skip to content

Commit 181424d

Browse files
committed
Improved Future.complete
1 parent 307d2b4 commit 181424d

File tree

7 files changed

+12
-10
lines changed

7 files changed

+12
-10
lines changed

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 <[email protected]>",
33
"name": "hprose-html5",
4-
"version": "2.0.26",
4+
"version": "2.0.27",
55
"description": "Hprose is a High Performance Remote Object Service Engine.",
66
"keywords": [
77
"hprose",

dist/hprose-html5.js

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

dist/hprose-html5.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-html5.src.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Hprose for HTML5 v2.0.26
1+
// Hprose for HTML5 v2.0.27
22
// Copyright (c) 2008-2016 http://hprose.com
33
// Hprose is freely distributable under the MIT license.
44
// For all details and documentation:
@@ -1772,7 +1772,8 @@ hprose.global = (
17721772
);
17731773
} },
17741774
complete: { value: function(oncomplete) {
1775-
return this.then(oncomplete, oncomplete);
1775+
oncomplete = oncomplete || function(v) { return v; };
1776+
return this.then(oncomplete, oncomplete);
17761777
} },
17771778
always: { value: function(oncomplete) {
17781779
this.done(oncomplete, oncomplete);

package.json

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

src/CopyRight.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Hprose for HTML5 v2.0.26
1+
// Hprose for HTML5 v2.0.27
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
@@ -687,7 +687,8 @@
687687
);
688688
} },
689689
complete: { value: function(oncomplete) {
690-
return this.then(oncomplete, oncomplete);
690+
oncomplete = oncomplete || function(v) { return v; };
691+
return this.then(oncomplete, oncomplete);
691692
} },
692693
always: { value: function(oncomplete) {
693694
this.done(oncomplete, oncomplete);

0 commit comments

Comments
 (0)