Update loading-bar.js

response.config return: "undefined .config" on offline connection. Added "response!=undefined &&" to prevent this.