aboutsummaryrefslogtreecommitdiff
path: root/utils/networkUtils.js
diff options
context:
space:
mode:
Diffstat (limited to 'utils/networkUtils.js')
-rw-r--r--utils/networkUtils.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/utils/networkUtils.js b/utils/networkUtils.js
index aaad6e2..2f84128 100644
--- a/utils/networkUtils.js
+++ b/utils/networkUtils.js
@@ -82,7 +82,7 @@ if(!global.networkUtilsThingSoopy){
if(!callback){
ret.sync()
- return this.loadedString
+ return loadedString
}
ret.async(()=>{
@@ -108,14 +108,12 @@ if(!global.networkUtilsThingSoopy){
},
responseCode: (callback)=>{
if(!callback){
- if(loadedConnection === undefined){
- ret.text()
- }
+ ret.sync()
return loadedConnection.getResponseCode()
}
- ret.text(data=>{
+ ret.async(data=>{
callback(loadedConnection.getResponseCode())
})
}