emscripten env consistency
This commit is contained in:
parent
cc4eeec031
commit
0049a240e7
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "taler-wallet",
|
"name": "taler-wallet",
|
||||||
"version": "0.0.4",
|
"version": "0.0.6",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "dist/node/index.js",
|
"main": "dist/node/index.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -102,14 +102,21 @@ export class SynchronousCryptoWorker {
|
|||||||
const savedImportScripts = g.importScripts;
|
const savedImportScripts = g.importScripts;
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
delete g.importScripts;
|
delete g.importScripts;
|
||||||
|
// @ts-ignore
|
||||||
|
const savedCrypto = g.crypto;
|
||||||
|
// @ts-ignore
|
||||||
|
delete g.crypto;
|
||||||
|
|
||||||
// Assume that the code is run from the build/ directory.
|
// Assume that the code is run from the build/ directory.
|
||||||
const libFn = indirectRequire(
|
const libFn = indirectRequire(
|
||||||
"../../../emscripten/taler-emscripten-lib.js",
|
"../../../emscripten/taler-emscripten-lib.js",
|
||||||
);
|
);
|
||||||
const lib = libFn(libArgs);
|
lib = libFn(libArgs);
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
g.importScripts = savedImportScripts;
|
g.importScripts = savedImportScripts;
|
||||||
|
// @ts-ignore
|
||||||
|
g.crypto = savedCrypto;
|
||||||
|
|
||||||
if (!lib) {
|
if (!lib) {
|
||||||
throw Error("could not load taler-emscripten-lib.js");
|
throw Error("could not load taler-emscripten-lib.js");
|
||||||
|
Loading…
Reference in New Issue
Block a user