Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Check for window.OpenAjax before trying to get the hub.

Only send messages to the hub if it exists.

close #477
  • Loading branch information...
commit 7e762751e8f6cb6a2fd3c425aceacb600d397461 1 parent 469d624
@shane-tomlinson shane-tomlinson authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 browserid/static/dialog/resources/network.js
View
4 browserid/static/dialog/resources/network.js
@@ -42,7 +42,7 @@ BrowserID.Network = (function() {
xhr = $,
server_time,
auth_status,
- hub = OpenAjax.hub;
+ hub = window.OpenAjax && OpenAjax.hub;
function deferResponse(cb) {
if (cb) {
@@ -58,7 +58,7 @@ BrowserID.Network = (function() {
function xhrError(cb, errorMessage) {
return function() {
if (cb) cb();
- hub.publish("xhrError", errorMessage);
+ hub && hub.publish("xhrError", errorMessage);
};
}
Please sign in to comment.
Something went wrong with that request. Please try again.