X-Git-Url: https://git.kengrimes.com/?p=henge%2Fkiak.git;a=blobdiff_plain;f=src%2FstrappFileSystem.js;fp=src%2FstrappFileSystem.js;h=8101311dc5c503bac2eb7b6b0c5cd1971b8772af;hp=5b2df7b162ce600b3c712a326156e22af18280bb;hb=2cc3f63700e73340ac203f260a884b45fc1de892;hpb=2b03fdac9b4b79770ab8cd5ded7b0353e179ab4d diff --git a/src/strappFileSystem.js b/src/strappFileSystem.js index 5b2df7b..8101311 100644 --- a/src/strappFileSystem.js +++ b/src/strappFileSystem.js @@ -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