src/JsRender/Node.vala
authorAlan Knowles <alan@roojs.com>
Mon, 30 May 2016 08:22:31 +0000 (16:22 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 30 May 2016 08:22:31 +0000 (16:22 +0800)
src/JsRender/Node.vala

index 4d72b22..e805983 100644 (file)
@@ -141,10 +141,13 @@ public class JsRender.Node : Object {
        }
        
        public void setLine(int line, string type, string prop) {
-               if (this.line_map.has_key(line) && this.line_map.get(line) != ":e"  ) {
-                       return;
+               if (this.line_map.has_key(line) {
+                       if  this.line_map.get(line) != ":e"  ) {
+                               return;
+                       }
+               } else {
+                       this.lines.add(line);
                }
-               this.lines.add(line);
                this.line_map.set(line, type + ":" + prop);
                GLib.debug("setLine %d, %s", line, type + ":" + prop);
        }