[open-ils-commits] [GIT] Evergreen ILS branch master updated. d5a8ecfb05739bcbcf61a12337916df44da98a63

Evergreen Git git at git.evergreen-ils.org
Fri Nov 10 12:16:09 EST 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  d5a8ecfb05739bcbcf61a12337916df44da98a63 (commit)
      from  70eaf2ac18952fca6d74d530dc2b7803e48ec370 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d5a8ecfb05739bcbcf61a12337916df44da98a63
Author: Bill Erickson <berickxx at gmail.com>
Date:   Thu Nov 9 11:39:12 2017 -0500

    LP#1731496 Avoid PhantomJS BroadcastChannel failure
    
    Avoid attempts to create BroadcastChannel objects in contexts where the
    object does not exist.  Specifically, allow PhantomJS to run unit tesst
    without dying on:
    
    ReferenceError: Can't find variable: BroadcastChannel
    
    Signed-off-by: Bill Erickson <berickxx at gmail.com>
    Signed-off-by: Chris Sharp <csharp at georgialibraries.org>

diff --git a/Open-ILS/web/js/ui/default/staff/services/auth.js b/Open-ILS/web/js/ui/default/staff/services/auth.js
index 8912c78..ec83005 100644
--- a/Open-ILS/web/js/ui/default/staff/services/auth.js
+++ b/Open-ILS/web/js/ui/default/staff/services/auth.js
@@ -53,7 +53,10 @@ function($q , $timeout , $rootScope , $window , $location , egNet , egHatch) {
         },
 
         // 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

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/web/js/ui/default/staff/services/auth.js |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list