From be6b72cf00c2dda05298b286c02ee01e2d1389c4 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 23 Oct 2015 19:17:02 -0400 Subject: [PATCH] Correct Syntax mapping. --- prototype/UI/index.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/prototype/UI/index.html b/prototype/UI/index.html index 34b39a45c..e6891764f 100644 --- a/prototype/UI/index.html +++ b/prototype/UI/index.html @@ -150,7 +150,9 @@ // forall a b. Syntax a -> (a -> b) -> Syntax b Syntax.prototype.map = function(transform) { - return new Syntax(this, transform); + if (this.leaf != null) { return new Syntax({ leaf: this.leaf }, transform); } + if (this.indexed != null) { return new Syntax({ indexed: this.indexed }, transform); } + if (this.keyed != null) { return new Syntax({ keyed: this.keyed }, transform); } } function diffFromJSON(json) {