Skip to content

Commit 56c849e

Browse files
committed
Update result.toJSON() handling
1 parent f1d0688 commit 56c849e

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

lib/gateway.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1975,10 +1975,9 @@ class Gateway extends EventEmitter {
19751975
!Buffer.isBuffer(result) &&
19761976
typeof result.toJSON === 'function'
19771977
) {
1978-
callback(err, result.toJSON(), headers, executionUuid);
1979-
} else {
1980-
callback(err, result, headers, executionUuid);
1978+
result = JSON.parse(JSON.stringify(result.toJSON()));
19811979
}
1980+
callback(err, result, headers, executionUuid);
19821981
}
19831982
};
19841983
setTimeout(() => {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "functionscript",
3-
"version": "2.10.4",
3+
"version": "2.10.5",
44
"description": "An API gateway and framework for turning functions into web services",
55
"author": "Keith Horwood <keithwhor@gmail.com>",
66
"main": "index.js",

0 commit comments

Comments
 (0)