Fix 'undefined C' issue
[xogo.git] / app.js
diff --git a/app.js b/app.js
index d871940..a6ee234 100644 (file)
--- a/app.js
+++ b/app.js
@@ -103,6 +103,7 @@ function showNewGameForm() {
     toggleVisible("newGameForm");
     import(`/variants/${vname}/class.js`).then(module => {
       window.V = module.default;
+      V.Aliases.forEach(e => window[e.key] = e.val);
       prepareOptions();
     });
   }
@@ -447,6 +448,7 @@ function initializeGame(obj) {
   const options = obj.options || {};
   import(`/variants/${obj.vname}/class.js`).then(module => {
     window.V = module.default;
+    V.Aliases.forEach(e => window[e.key] = e.val);
     // Load CSS. Avoid loading twice the same stylesheet:
     const allIds = [].slice.call($.styleSheets).map(s => s.id);
     const newId = obj.vname + "_css";