fix scope bug in transaction handling
[org.ibex.xt-crawshaw.git] / src / java / org / ibex / xt / Template.java
index 323fb00..6afe1b2 100644 (file)
@@ -235,7 +235,8 @@ public class Template extends JSLeaf.Element {
             StringReader sr = new StringReader(sw.toString());
 
             JS t;
-            try { t = JS.fromReader("input", 0, sr); }
+            try { t = JS.cloneWithNewParentScope(
+                        JS.fromReader("input", 0, sr), new JSScope(null)); }
             catch (IOException e) { throw new JSLeaf.Exn(e.getMessage()); }
 
             try {