aboutsummaryrefslogtreecommitdiffstats
path: root/lang/js/src/Connection.js
diff options
context:
space:
mode:
Diffstat (limited to 'lang/js/src/Connection.js')
-rw-r--r--lang/js/src/Connection.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/lang/js/src/Connection.js b/lang/js/src/Connection.js
index 07df5def..3b442622 100644
--- a/lang/js/src/Connection.js
+++ b/lang/js/src/Connection.js
@@ -215,7 +215,13 @@ class Answer{
if (!this._response.hasOwnProperty(key)){
this._response[key] = [];
}
- this._response[key].push(msg[key]);
+ if (Array.isArray(msg[key])) {
+ for (let i=0; i< msg[key].length; i++) {
+ this._response[key].push(msg[key][i]);
+ }
+ } else {
+ this._response[key].push(msg[key][i]);
+ }
}
else {
return gpgme_error('CONN_UNEXPECTED_ANSWER');