Fixed compilation for new projects

The problem was:
 IDEA passes a DummyCompilerContext, whose project is null
 As a result, a freshly created "Hello, world" didn't run (failed with NoClassDefFound, because the compiler didn't emit any code)
This commit is contained in:
Andrey Breslav
2012-05-11 15:49:59 +04:00
parent b1e5a0768c
commit fac735a419
@@ -62,7 +62,7 @@ public class JetCompiler implements TranslatingCompiler {
return false;
}
Project project = compileContext.getProject();
if (project == null || JsModuleDetector.isJsProject(project)) {
if (project != null && JsModuleDetector.isJsProject(project)) {
return false;
}
return true;