diff options
author | tomsmeding <tom.smeding@gmail.com> | 2017-08-26 12:26:55 +0200 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2017-08-26 12:26:55 +0200 |
commit | 1ef4cc533939efb94a9dceb7615ac4b3180df9b3 (patch) | |
tree | 7f7bbcc52e83ef78ee46f725bb6ed2018adcd2bf /modules/proxy | |
parent | 6d05039a96f67388b60932ed89b25b71b6bc612c (diff) |
Fix null reference bug
Diffstat (limited to 'modules/proxy')
-rw-r--r-- | modules/proxy/proxy.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/proxy/proxy.js b/modules/proxy/proxy.js index e18ab6a..49caf54 100644 --- a/modules/proxy/proxy.js +++ b/modules/proxy/proxy.js @@ -38,7 +38,7 @@ module.exports=function(app,io,moddir){ var path="/"+req.path.split("/").slice(3).join("/"); if(iddict[id]){ fetch(req.method,iddict[id]+path,function(obj,body){ - if(obj.status==null){ + if(obj==null||obj.status==null){ res.status(500).send("An error occurred...\n"); return; } |