Handled undefined children in the gflib.js Fun.show() function.

This shouldn't really happen, but if it does, debugging is much easier.
This commit is contained in:
bjorn
2008-06-17 11:06:46 +00:00
parent e5969581bc
commit b043de5529

View File

@@ -34,7 +34,7 @@ Fun.prototype.show = function (prec) {
var s = this.name;
var cs = this.args;
for (var i in cs) {
s += " " + cs[i].show(1);
s += " " + (isUndefined(cs[i]) ? "undefined" : cs[i].show(1));
}
if (prec > 0 && cs.length > 0) {
s = "(" + s + ")" ;