aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-08-16 00:54:48 +0200
committerFlorian Dold <florian.dold@gmail.com>2019-08-16 00:54:48 +0200
commit0049a240e73b4665e8ace6ae9171609460fe3954 (patch)
tree12ecf86280173b03096642560315500dc60b2944
parentcc4eeec0318def17ac966be2d0ad8547ce782bc7 (diff)
emscripten env consistency
-rw-r--r--package.json2
-rw-r--r--src/crypto/synchronousWorker.ts9
2 files changed, 9 insertions, 2 deletions
diff --git a/package.json b/package.json
index a7dce61e9..6c844817d 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "taler-wallet",
- "version": "0.0.4",
+ "version": "0.0.6",
"description": "",
"main": "dist/node/index.js",
"repository": {
diff --git a/src/crypto/synchronousWorker.ts b/src/crypto/synchronousWorker.ts
index c8ee3be19..1c98209aa 100644
--- a/src/crypto/synchronousWorker.ts
+++ b/src/crypto/synchronousWorker.ts
@@ -102,14 +102,21 @@ export class SynchronousCryptoWorker {
const savedImportScripts = g.importScripts;
// @ts-ignore
delete g.importScripts;
+ // @ts-ignore
+ const savedCrypto = g.crypto;
+ // @ts-ignore
+ delete g.crypto;
// Assume that the code is run from the build/ directory.
const libFn = indirectRequire(
"../../../emscripten/taler-emscripten-lib.js",
);
- const lib = libFn(libArgs);
+ lib = libFn(libArgs);
+
// @ts-ignore
g.importScripts = savedImportScripts;
+ // @ts-ignore
+ g.crypto = savedCrypto;
if (!lib) {
throw Error("could not load taler-emscripten-lib.js");