diff --git a/net/http/src/THttpServer.cxx b/net/http/src/THttpServer.cxx
index 579e9c02f216cfc1cc7e8e1f2b3fab476d2c7979..c0c495fd5cddbc17cf40743555d5eae847903ab7 100644
--- a/net/http/src/THttpServer.cxx
+++ b/net/http/src/THttpServer.cxx
@@ -142,11 +142,12 @@ THttpServer::THttpServer(const char *engine) : TNamed("http", "ROOT http server"
    if (!jsrootsys)
       jsrootsys = gEnv->GetValue("HttpServ.JSRootPath", jsrootsys);
 
-   if (jsrootsys && *jsrootsys)
+   if (jsrootsys && *jsrootsys) {
       if ((strncmp(jsrootsys, "http://", 7)==0) || (strncmp(jsrootsys, "https://", 8)==0))
          fJSROOT = jsrootsys;
       else
          fJSROOTSYS = jsrootsys;
+   }
 
    if (fJSROOTSYS.Length() == 0) {
       TString jsdir = TString::Format("%s/js", TROOT::GetDataDir().Data());