sanity check
[henge/kiak.git] / src / strappFileSystem.js
index 5b2df7b..8101311 100644 (file)
@@ -86,7 +86,7 @@ const StrappFileSystem = (() => {
   /* API Definition */
   const StrappFileSystem = {
     request: (location, method, data) =>
-      new Promise((resolve, reject) => this.loadWaiters.push([
+      new Promise((resolve, reject) => StrappFileSystem.loadWaiters.push([
         location, method, data, resolve, reject
       ])),
     get: (location) => StrappFileSystem.request(location, 'GET'),
@@ -117,6 +117,7 @@ const StrappFileSystem = (() => {
       StrappFileSystem.request = _request
       StrappFileSystem.loadWaiters
         .map((w) => _request(w[0], w[1], w[2], w[3]).then(w[4], w[5]))
+      delete StrappFileSystem.loadWaiters
     })
   
   return StrappFileSystem