aboutsummaryrefslogtreecommitdiff
path: root/extension/background/main.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2016-02-19 04:23:00 +0100
committerFlorian Dold <florian.dold@gmail.com>2016-02-19 04:23:00 +0100
commit29dfafaa1282d6b1e03bd7211ce598a09c22bae7 (patch)
treede2973abea8b4dfedfd820d8c318e50b0ad2fa92 /extension/background/main.ts
parent5a12edcd5d49029d85c47dc1169a5cc26cc6d10b (diff)
error handling
Diffstat (limited to 'extension/background/main.ts')
-rw-r--r--extension/background/main.ts22
1 files changed, 12 insertions, 10 deletions
diff --git a/extension/background/main.ts b/extension/background/main.ts
index 5fdee658e..4ec2c4d5d 100644
--- a/extension/background/main.ts
+++ b/extension/background/main.ts
@@ -23,8 +23,8 @@
// TypeScript does not allow ".js" extensions in the
// module name, so SystemJS must add it.
System.config({
- defaultJSExtensions: true,
-});
+ defaultJSExtensions: true,
+ });
// We expect that in the manifest, the emscripten js is loaded
// becore the background page.
@@ -36,14 +36,16 @@ if ("object" !== typeof Module) {
// Manually register the emscripten js as a SystemJS, so that
// we can use it from TypeScript by importing it.
-let mod = System.newModule({Module: Module});
-let modName = System.normalizeSync("../lib/emscripten/emsc");
-console.log("registering", modName);
-System.set(modName, mod);
-
-System.import("../lib/wallet/wxmessaging")
- .then((wxmessaging) => {
- wxmessaging.wxMain();
+{
+ let mod = System.newModule({Module: Module});
+ let modName = System.normalizeSync("../lib/emscripten/emsc");
+ console.log("registering", modName);
+ System.set(modName, mod);
+}
+
+System.import("../lib/wallet/wxMessaging")
+ .then((wxMessaging) => {
+ wxMessaging.wxMain();
})
.catch((e) => {
console.log("wallet failed");