Skip to content

Commit c51b806

Browse files
committed
// BH 6/19/2018 8:49:57 AM fix for checkDeclared
1 parent 269f2d2 commit c51b806

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
// Google closure compiler cannot handle Clazz.new or Clazz.super
99

10+
// BH 6/19/2018 8:49:57 AM fix for checkDeclared
1011
// BH 5/19/2018 8:22:25 PM fix for new int[] {'a'}
1112
// BH 4/16/2018 6:14:10 PM msie flag in monitor
1213
// BH 2/22/2018 12:34:07 AM array.clone() fix
@@ -775,11 +776,10 @@ var _declared = {};
775776

776777
var checkDeclared = function(name, type) {
777778
if (J2S._debugName && name.toLowerCase() == J2S._debugName)doDebugger();
778-
if (_declared[name] == type) {
779+
if (_declared[name] != null && _declared[name] == type) {
779780
var s = (type === 0 ? "interface" : "class") +" " + name + " is defined twice. A prior core file has probably needed to load a class that is in the current core file. Check to make sure that package.js declares the first class read in jarClassPath or that BuildCompress has included all necessary files."
780781
System.out.println(s);
781-
if (J2S._debugCore)
782-
doDebugger();
782+
// if (J2S._debugCore) doDebugger();
783783
}
784784
_declared[name] = type;
785785
}

0 commit comments

Comments
 (0)