aboutsummaryrefslogtreecommitdiffstats
path: root/lang/js/src/index.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lang/js/src/index.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lang/js/src/index.js b/lang/js/src/index.js
index dc613fc7..2fed95f9 100644
--- a/lang/js/src/index.js
+++ b/lang/js/src/index.js
@@ -34,11 +34,11 @@ import { Connection } from './Connection';
*/
function init(){
return new Promise(function(resolve, reject){
- let connection = new Connection;
+ let connection = Object.freeze(new Connection);
connection.checkConnection(false).then(
function(result){
if (result === true) {
- resolve(new GpgME());
+ resolve(Object.freeze(new GpgME()));
} else {
reject(gpgme_error('CONN_NO_CONNECT'));
}