Skip to content

Commit

Permalink
Fixed a bug of Future.
Browse files Browse the repository at this point in the history
  • Loading branch information
andot committed Oct 21, 2016
1 parent 51398f4 commit b3538bc
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 20 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.15",
"version": "2.0.16",
"description": "Hprose is a High Performance Remote Object Service Engine.",
"keywords": [
"hprose",
Expand Down
6 changes: 3 additions & 3 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.

8 changes: 4 additions & 4 deletions dist/hprose.src.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Hprose for JavaScript v2.0.15
// Hprose for JavaScript v2.0.16
// Copyright (c) 2008-2016 http://hprose.com
// Hprose is freely distributable under the MIT license.
// For all details and documentation:
Expand Down Expand Up @@ -1733,7 +1733,7 @@
* *
* hprose Future for JavaScript. *
* *
* LastModified: Sep 29, 2016 *
* LastModified: Oct 21, 2016 *
* Author: Ma Bingyao <[email protected]> *
* *
\**********************************************************/
Expand Down Expand Up @@ -1782,7 +1782,7 @@
}

function toPromise(obj) {
return (isPromise(obj) ? obj : value(obj));
return (isFuture(obj) ? obj : value(obj));
}

function delayed(duration, value) {
Expand Down Expand Up @@ -2122,7 +2122,7 @@
this.reject(new TypeError('Self resolution'));
return;
}
if (isPromise(value)) {
if (isFuture(value)) {
value.fill(this);
return;
}
Expand Down
6 changes: 3 additions & 3 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.15",
"version": "2.0.16",
"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.15
// Hprose for JavaScript v2.0.16
// Copyright (c) 2008-2016 http://hprose.com
// Hprose is freely distributable under the MIT license.
// For all details and documentation:
Expand Down
6 changes: 3 additions & 3 deletions src/Future.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* *
* hprose Future for JavaScript. *
* *
* LastModified: Sep 29, 2016 *
* LastModified: Oct 21, 2016 *
* Author: Ma Bingyao <[email protected]> *
* *
\**********************************************************/
Expand Down Expand Up @@ -62,7 +62,7 @@
}

function toPromise(obj) {
return (isPromise(obj) ? obj : value(obj));
return (isFuture(obj) ? obj : value(obj));
}

function delayed(duration, value) {
Expand Down Expand Up @@ -402,7 +402,7 @@
this.reject(new TypeError('Self resolution'));
return;
}
if (isPromise(value)) {
if (isFuture(value)) {
value.fill(this);
return;
}
Expand Down
6 changes: 3 additions & 3 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 b3538bc

Please sign in to comment.