This is an automated email from the ASF dual-hosted git repository.

solomax pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openmeetings.git


The following commit(s) were added to refs/heads/master by this push:
     new 74b1df819 [OPENMEETINGS-2738] temporary fix
74b1df819 is described below

commit 74b1df819c992ec3c7b92cb865164d5d08c0a47b
Author: Maxim Solodovnik <[email protected]>
AuthorDate: Mon May 30 15:41:39 2022 +0700

    [OPENMEETINGS-2738] temporary fix
---
 openmeetings-web/src/main/front/wb/package.json             | 8 ++++----
 openmeetings-web/src/main/front/wb/src/index.js             | 7 +++++++
 openmeetings-web/src/main/front/wb/src/wb-tool-stat-math.js | 3 ---
 openmeetings-web/src/main/front/wb/src/wb.js                | 6 +++++-
 4 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/openmeetings-web/src/main/front/wb/package.json 
b/openmeetings-web/src/main/front/wb/package.json
index 805ab69d2..a8ded1c78 100644
--- a/openmeetings-web/src/main/front/wb/package.json
+++ b/openmeetings-web/src/main/front/wb/package.json
@@ -4,18 +4,18 @@
   "description": "Methods for WB",
   "main": "src/index.js",
   "scripts": {
-    "build-dev": "browserify src/index.js --transform-key=staging -p esmify -o 
${outDir}${npm_package_name}.js",
-    "build-prod": "browserify src/index.js --transform-key=production -p 
esmify | terser -o ${outDir}${npm_package_name}.min.js",
+    "build-dev": "browserify -t brfs src/index.js --transform-key=staging -p 
esmify -o ${outDir}${npm_package_name}.js",
+    "build-prod": "browserify -t brfs src/index.js -t brfs 
--transform-key=production -p esmify | terser -o 
${outDir}${npm_package_name}.min.js",
     "build": "npm run build-dev && npm run build-prod"
   },
   "author": "",
   "license": "Apache-2.0",
   "rat-license": "Licensed under the Apache License, Version 2.0 (the 
\"License\") http://www.apache.org/licenses/LICENSE-2.0";,
   "devDependencies": {
+    "brfs": "^2.0.2",
     "browserify": "^17.0.0",
     "esmify": "^2.1.1",
-    "terser": "^5.13.1",
-    "tinyify": "^3.0.0"
+    "terser": "^5.13.1"
   },
   "dependencies": {
     "fabric": "^5.2.1",
diff --git a/openmeetings-web/src/main/front/wb/src/index.js 
b/openmeetings-web/src/main/front/wb/src/index.js
index 1c51ebe36..4fe899e18 100644
--- a/openmeetings-web/src/main/front/wb/src/index.js
+++ b/openmeetings-web/src/main/front/wb/src/index.js
@@ -1,5 +1,12 @@
 /* Licensed under the Apache License, Version 2.0 (the "License") 
http://www.apache.org/licenses/LICENSE-2.0 */
 
+// HACK!!!!! to avoid eval to determine MathJax version
+const fs = require('fs')
+       , pkg_src = fs.readFileSync(__dirname + 
'/../node_modules/mathjax-full/package.json', 'utf8');
+
+window.PACKAGE_VERSION = JSON.parse(pkg_src).version;
+// END HACK
+
 Object.assign(window, {
        InterviewWbArea: require('./interview-area')
        , DrawWbArea: require('./wb-area')
diff --git a/openmeetings-web/src/main/front/wb/src/wb-tool-stat-math.js 
b/openmeetings-web/src/main/front/wb/src/wb-tool-stat-math.js
index fe50f6e2b..42aaee415 100644
--- a/openmeetings-web/src/main/front/wb/src/wb-tool-stat-math.js
+++ b/openmeetings-web/src/main/front/wb/src/wb-tool-stat-math.js
@@ -1,9 +1,6 @@
 /* Licensed under the Apache License, Version 2.0 (the "License") 
http://www.apache.org/licenses/LICENSE-2.0 */
 require('fabric');
 
-// HACK!!!!! to avoid eval to determine MathJax version
-window.PACKAGE_VERSION = '3.2.1';
-
 // Based on this example: 
https://github.com/mathjax/MathJax-demos-node/blob/master/preload/tex2svg
 const packages = 'base, autoload, require, ams, newcommand, 
noundefined'.split(/\s*,\s*/);
 
diff --git a/openmeetings-web/src/main/front/wb/src/wb.js 
b/openmeetings-web/src/main/front/wb/src/wb.js
index adbff2fe6..4c9d91096 100644
--- a/openmeetings-web/src/main/front/wb/src/wb.js
+++ b/openmeetings-web/src/main/front/wb/src/wb.js
@@ -458,7 +458,11 @@ module.exports = class Wb {
                        for (let i = 1; i < canvases.length; ++i) {
                                const cc = $('#can-' + this.id + '-slide-' + 
i).closest('.canvas-container');
                                cc.remove();
-                               canvases[i].dispose();
+                               try { // FIXME TODO HACK
+                                       canvases[i].dispose();
+                               } catch {
+                                       //no-op
+                               }
                        }
                        $('.room-block .wb-block .wb-video').remove();
                        canvases.splice(1);

Reply via email to