LP#1746020 Fix Safari/iOS login issue user/kmlussier/lp1746020-broadcast-channel-workaround
authorKathy Lussier <klussier@masslnc.org>
Tue, 6 Feb 2018 17:41:19 +0000 (12:41 -0500)
committerKathy Lussier <klussier@masslnc.org>
Tue, 6 Feb 2018 17:50:30 +0000 (12:50 -0500)
Works around an issue where users cannot log into the web client using iOS
because Safari, which all browsers running on iOS use to some extent, does not
support BroadcastChannel.

Many thanks to Galen Charlton for providing a diff with this solution!

Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/web/js/ui/default/staff/services/auth.js

index ec83005..b93b6b8 100644 (file)
@@ -312,7 +312,7 @@ function($q , $timeout , $rootScope , $window , $location , egNet , egHatch) {
 
     service.logout = function(broadcast) {
 
-        if (broadcast) {
+        if (broadcast && service.authChannel.postMessage) {
             // Tell the other tabs to shut it all down.
             service.authChannel.postMessage({action : 'logout'});
         }