src/JsRender/PlainFile.vala
authorAlan Knowles <alan@roojs.com>
Wed, 11 Nov 2015 09:55:50 +0000 (17:55 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 11 Nov 2015 09:55:50 +0000 (17:55 +0800)
src/JsRender/PlainFile.vala

index 1d139ce..7fcb972 100644 (file)
@@ -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;
        }