From 0049a240e73b4665e8ace6ae9171609460fe3954 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Fri, 16 Aug 2019 00:54:48 +0200 Subject: emscripten env consistency --- package.json | 2 +- src/crypto/synchronousWorker.ts | 9 ++++++++- 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"); -- cgit v1.2.3