src/JsRender/NodeToJs.vala
[app.Builder.js] / src / JsRender / PlainFile.vala
index 94f86f1..7fcb972 100644 (file)
@@ -32,12 +32,12 @@ namespace JsRender {
                    this.content_type = ct;
             } else {
                        this.content_type = "text/plain"; // hopefully..
-                       var ar = path.split(".");
-                       var ext = ar[ar.length -1]; // hopefully not fail...
+//                     var ar = path.split(".");
+  //                   var ext = ar[ar.length -1]; // hopefully not fail...
                        
-                       switch(ext) { 
-                               case "vala";
-                                       
+  //                   switch(ext) { 
+       //                      case "vala";
+                       this.loaded = true;
                        
             
             }
@@ -84,9 +84,11 @@ namespace JsRender {
     
        public   override void  loadItems() throws GLib.Error // : function(cb, sync) == original was async.
        {
-          
-              GLib.FileUtils.get_contents(this.path, out this.contents);
-              this.loaded = true;
+                       if (this.loaded) {
+                               return;
+                       }
+               GLib.FileUtils.get_contents(this.path, out this.contents);
+               this.loaded = true;
        }