From 1ef4cc533939efb94a9dceb7615ac4b3180df9b3 Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Sat, 26 Aug 2017 12:26:55 +0200 Subject: Fix null reference bug --- modules/proxy/proxy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/proxy') 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; } -- cgit v1.2.3-70-g09d2