Skip to content

Commit a4efd9a

Browse files
committed
VERSION check fixes - removes build comparison
1 parent 03c2e34 commit a4efd9a

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

sources/net.sf.j2s.java.core/srcjs/js/j2sApplet.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,23 @@
2020

2121
if (J2S && J2S._version) return;
2222

23+
24+
/*
25+
* VERSION should match what is at the end of the transpiled JavaScript .js "class" files,
26+
* or a message in System.err will be generated by Clazz.setTVer(ver).
27+
*
28+
*/
29+
var VERSION = "3.2.5";
30+
31+
2332
jQuery || alert("Note -- jQuery is required, but it's not defined.");
2433

2534
var $ = jQuery;
2635

2736
// settings in user-defined J2S will be added last
2837

2938
J2S || (J2S = {
39+
_version: VERSION,
3040
_debugCode: false,
3141
_debugCore: false,
3242
_debugPaint: false,
@@ -45,9 +55,6 @@ J2S || (J2S = {
4555
_appArgs: null
4656
});
4757

48-
//These should match with what is at the end of the transpiled JavaScript
49-
J2S._version = "3.2.5-v0";
50-
5158
// for now, Clazz is a window global. Wouldn't be hard to encapsulate that,
5259
// but it has to be also encapsulated in Clazz.
5360

sources/net.sf.j2s.java.core/srcjs/js/j2sClazz.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
J2S.LoadClazz = function(Clazz) {
6363

6464
Clazz.setTVer = function(ver) { // from class loading
65-
if (Clazz._VERSION_T != ver)
65+
if (Clazz._VERSION_T.split('-')[0] != ver.split('-')[0])
6666
System.err.println("transpiler was " + Clazz._VERSION_T + " now " + ver + " for " + lastLoaded);
6767
Clazz._VERSION_T = ver;
6868
}

0 commit comments

Comments
 (0)