aboutsummaryrefslogtreecommitdiffstats
path: root/lang/js/src
diff options
context:
space:
mode:
authorMaximilian Krambach <[email protected]>2018-08-01 10:51:12 +0000
committerMaximilian Krambach <[email protected]>2018-08-01 10:51:12 +0000
commit68a012deb3b501d7417778be12c88bd475a37cb5 (patch)
tree453fd5544589dbc51968f2138f7816b69ae83c66 /lang/js/src
parentjs: fix confusion about loop in last commit (diff)
downloadgpgme-68a012deb3b501d7417778be12c88bd475a37cb5.tar.gz
gpgme-68a012deb3b501d7417778be12c88bd475a37cb5.zip
js: make init export immutable
-- * src/index.js: The export now uses a freezed Object, which does not allow for simply overwriting the init method by e.g. a third-party library. * BrowsertestExtension: Added some tests trying if decryption of bad data properly fails
Diffstat (limited to 'lang/js/src')
-rw-r--r--lang/js/src/index.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/lang/js/src/index.js b/lang/js/src/index.js
index 2fed95f9..51f07538 100644
--- a/lang/js/src/index.js
+++ b/lang/js/src/index.js
@@ -34,7 +34,7 @@ import { Connection } from './Connection';
*/
function init(){
return new Promise(function(resolve, reject){
- let connection = Object.freeze(new Connection);
+ const connection = Object.freeze(new Connection);
connection.checkConnection(false).then(
function(result){
if (result === true) {
@@ -48,6 +48,5 @@ function init(){
});
}
-export default {
- init: init
-}; \ No newline at end of file
+const exportvalue = Object.freeze({init:init});
+export default exportvalue; \ No newline at end of file