diff --git a/browserid/static/dialog/resources/network.js b/browserid/static/dialog/resources/network.js index 503fb8aea3d68e2f9e9e34aa7836972866593046..daf5edb840f8499da6483b6fc1d811aef77f6000 100644 --- a/browserid/static/dialog/resources/network.js +++ b/browserid/static/dialog/resources/network.js @@ -109,7 +109,7 @@ BrowserID.Network = (function() { auth_status = result.authenticated; cb(); }, - error: xhrError(onFailure) + error: deferResponse(xhrError(onFailure)) }); } } @@ -124,15 +124,6 @@ BrowserID.Network = (function() { hub.publish("offline"); }); - function xhrError(callback, error) { - return function() { - if (callback) { - callback(); - } - hub.publish("xhrError", error); - }; - } - var Network = { /** * Set the XHR object and clear all context info. Used for testing.