Fix if statement without else

This commit is contained in:
Fazli Sapuan 2016-02-23 20:29:24 +08:00
parent d82ea1f633
commit 93a78d795d

View File

@ -343,8 +343,11 @@ var functionNode_webgl = (function() {
ast_generic(ifNode.test, retArr, funcParam);
retArr.push(")");
ast_generic(ifNode.consequent, retArr, funcParam);
retArr.push("else");
ast_generic(ifNode.alternate, retArr, funcParam);
if (ifNode.alternate) {
retArr.push("else");
ast_generic(ifNode.alternate, retArr, funcParam);
}
return retArr;
}