Current version of PhantomJS used for unit tests, etc. does not
recognize the relatively new BroadcastChannel object. Avoid trying to
create such a channel when the executing code does not recognize it.
Signed-off-by: Bill Erickson <berickxx@gmail.com>
},
// Listen for logout events in other tabs
- authChannel : new BroadcastChannel('eg.auth')
+ // Current version of phantomjs (unit tests, etc.) does not
+ // support BroadcastChannel, so just dummy it up.
+ authChannel : (typeof BroadcastChannel == 'undefined') ?
+ {} : new BroadcastChannel('eg.auth')
};
/* Returns a promise, which is resolved if valid